Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ariga/atlas
/ functions
Functions
7,770 in github.com/ariga/atlas
⨍
Functions
7,770
◇
Types & classes
1,019
↓ 14 callers
Function
firstResult
(r T, err error)
atlasexec/atlas.go:587
↓ 14 callers
Function
migrateDiffCmd
migrateDiffCmd represents the 'atlas migrate diff' subcommand.
cmd/atlas/internal/cmdapi/migrate.go:503
↓ 13 callers
Method
Bool
Bool returns a boolean from the Value of the Attr. If The value is not a LiteralValue or the value cannot be converted to a boolean an error is return
schemahcl/spec.go:186
↓ 13 callers
Function
Code
Code stores the given code in the registry. It protects from duplicate analyzers' codes.
sql/sqlcheck/sqlcheck.go:299
↓ 13 callers
Method
Desc
Desc returns the description of the migration File.
sql/migrate/dir.go:47
↓ 13 callers
Method
Quote
Quote wraps the given function with a single quote and a prefix
sql/internal/sqlx/sqlx.go:435
↓ 13 callers
Method
Table
Table writes the table identifier to the builder, prefixed with the schema name if exists.
sql/internal/sqlx/sqlx.go:305
↓ 13 callers
Method
WritePlan
WritePlan writes the given Plan to the Dir based on the configured Formatter.
sql/migrate/migrate.go:519
↓ 13 callers
Method
noIndexes
()
sql/mysql/inspect_test.go:1082
↓ 12 callers
Method
AddSchemas
AddSchemas adds and links the given schemas to the realm.
sql/schema/dsl.go:100
↓ 12 callers
Method
Applied
Applied returns the value of the "applied" field in the mutation.
cmd/atlas/internal/migrate/ent/mutation.go:266
↓ 12 callers
Method
Build
Build instantiates a new builder and writes the given phrase to it.
sql/mysql/migrate.go:749
↓ 12 callers
Method
Dir
Dir retrieves a directory from the Atlas Cloud API.
cmd/atlas/internal/cloudapi/client.go:97
↓ 12 callers
Method
Int
Int returns an int from the Value of the Attr. If The value is not a LiteralValue or the value cannot be converted to an integer an error is returned.
schemahcl/spec.go:138
↓ 12 callers
Function
Marshal
Marshal marshals v into an Atlas DDL document using a schemahcl.Marshaler. Marshal uses the given schemaSpec function to convert a *schema.Schema into
sql/internal/specutil/spec.go:40
↓ 12 callers
Method
MigrateApply
MigrateApply runs the 'migrate apply' command.
atlasexec/atlas_migrate.go:270
↓ 12 callers
Function
Open
Open opens a new SQLite driver.
sql/sqlite/driver.go:116
↓ 12 callers
Function
P
P returns a pointer to v.
sql/internal/sqlx/sqlx.go:661
↓ 12 callers
Method
Register
Register adds one or more TypeSpec to the registry.
schemahcl/types.go:98
↓ 12 callers
Method
Replace
Replace overrides the variables.
cmd/atlas/internal/cmdapi/cmdapi.go:238
↓ 12 callers
Function
ScaleTypeAttr
ScaleTypeAttr returns a TypeAttr for a scale attribute.
schemahcl/types.go:358
↓ 12 callers
Method
String
String returns a string from the Value of the Attr. If The value is not a LiteralValue an error is returned. String values are expected to be quoted.
schemahcl/spec.go:177
↓ 12 callers
Method
Type
Type implements pflag.Value.Type.
cmd/atlas/internal/cmdapi/cmdapi.go:270
↓ 12 callers
Function
UnsupportedErr
(feature string)
cmd/atlas/internal/cmdext/cmdext.go:732
↓ 12 callers
Function
V
V returns the value p is pointing to. If p is nil, the zero value is returned.
sql/internal/sqlx/sqlx.go:667
↓ 12 callers
Function
Var
Var formats a string as variable to make it HCL compatible. The result is simple, replace each space with underscore.
sql/internal/specutil/convert.go:1060
↓ 12 callers
Method
append
(c *migrate.Change)
sql/sqlite/migrate.go:537
↓ 12 callers
Method
dbURL
(db, schema string)
internal/integration/postgres_test.go:1585
↓ 12 callers
Function
excludeConst
excludeConst returns the first exclude constraint from the given attributes.
sql/postgres/diff.go:562
↓ 12 callers
Function
migrateHashCmd
migrateHashCmd represents the 'atlas migrate hash' subcommand.
cmd/atlas/internal/cmdapi/migrate.go:614
↓ 11 callers
Method
Build
Build instantiates a new builder and writes the given phrase to it.
sql/sqlite/migrate.go:589
↓ 11 callers
Method
Close
Close closes the underlying database connection and the migration driver in case it implements the io.Closer interface.
sql/sqlclient/client.go:146
↓ 11 callers
Method
Log
(LogEntry)
sql/migrate/migrate.go:1184
↓ 11 callers
Method
NL
NL adds line break and prefix the new line with indentation in case indentation is enabled.
sql/internal/sqlx/sqlx.go:395
↓ 11 callers
Function
SameTable
SameTable reports if the two objects represent the same table.
sql/internal/sqlx/plan.go:545
↓ 11 callers
Method
SetName
SetName configures the name of the check constraint.
sql/schema/dsl.go:674
↓ 11 callers
Method
SetType
SetType configures the type of the column
sql/schema/dsl.go:599
↓ 11 callers
Method
next
()
sql/migrate/lex.go:286
↓ 11 callers
Method
posts
()
internal/integration/integration_test.go:129
↓ 11 callers
Method
version
(version string)
sql/postgres/inspect_test.go:717
↓ 11 callers
Method
version
(version string)
sql/mysql/inspect_test.go:1060
↓ 10 callers
Method
Create
Create returns a builder for creating a Revision entity.
cmd/atlas/internal/migrate/ent/client.go:232
↓ 10 callers
Function
DiffSkipChanges
DiffSkipChanges returns a DiffOption that skips the given change types. For example, in order to skip all destructive changes, use: DiffSkipChanges(
sql/schema/migrate.go:373
↓ 10 callers
Method
GTE
GTE reports if the version is >= w.
sql/mysql/internal/mysqlversion/mysqlversion.go:174
↓ 10 callers
Function
NewWorkingDir
NewWorkingDir creates a new ContextExecer. It creates a temporary directory and copies all files from dir to the temporary directory. The atlasHCL fun
atlasexec/working_dir.go:72
↓ 10 callers
Method
Range
Range returns the attribute range on the file, or nil if it is not set.
schemahcl/spec.go:404
↓ 10 callers
Method
ReadRevisions
ReadRevisions returns all revisions.
sql/migrate/migrate.go:227
↓ 10 callers
Method
Report
Report creates and writes a MigrateStatus.
cmd/atlas/internal/cmdlog/cmdlog.go:211
↓ 10 callers
Method
ReportMigration
ReportMigration reports a migration deployment to the Atlas Cloud API.
cmd/atlas/internal/cloudapi/client.go:243
↓ 10 callers
Method
Resource
Resource returns the first child Resource by its type and reports whether it was found.
schemahcl/spec.go:420
↓ 10 callers
Method
SetAttr
SetAttr sets the Attr on the Resource. If r is nil, a zero value Resource is initialized. If an Attr with the same key exists, it is replaced by attr.
schemahcl/spec.go:461
↓ 10 callers
Method
SetDefault
SetDefault configures the default of the column
sql/schema/dsl.go:608
↓ 10 callers
Function
VarAttr
VarAttr is a helper method for constructing *schemahcl.Attr instances that contain a variable reference.
sql/internal/specutil/spec.go:218
↓ 10 callers
Function
WithExecOrder
WithExecOrder sets the execution order to use.
sql/migrate/migrate.go:657
↓ 10 callers
Function
WithLogger
WithLogger sets the Logger of an Executor.
sql/migrate/migrate.go:630
↓ 10 callers
Function
addFlagDirURL
addFlagURL adds a URL flag. If given, args[0] override the name, args[1] the shorthand, args[2] the default value.
cmd/atlas/internal/cmdapi/cmdapi.go:329
↓ 10 callers
Function
migrateNewCmd
migrateNewCmd represents the 'atlas migrate new' subcommand.
cmd/atlas/internal/cmdapi/migrate.go:828
↓ 10 callers
Function
plural
(n int)
atlasexec/atlas_migrate.go:822
↓ 10 callers
Function
plural
(n int)
cmd/atlas/internal/cmdlog/cmdlog.go:665
↓ 10 callers
Function
setContextOp
setContextOp returns a new context with the given QueryContext attached (including its op) in case it does not exist.
cmd/atlas/internal/migrate/ent/ent.go:530
↓ 10 callers
Function
testCLISchemaApply
(t T, h string, url string, args ...string)
internal/integration/integration_test.go:450
↓ 10 callers
Function
uniqueConst
uniqueConst returns the first unique constraint from the given attributes.
sql/postgres/diff.go:552
↓ 10 callers
Function
unsignedTypeAttr
()
sql/mysql/sqlspec.go:548
↓ 10 callers
Function
unsupportedCommand
unsupportedCommand create a stub command that reports the command is not supported by this build.
cmd/atlas/internal/cmdapi/cmdapi.go:662
↓ 9 callers
Method
Append
Append extends a chain, adding the specified hook as the last ones in the mutation flow.
cmd/atlas/internal/migrate/ent/hook/hook.go:192
↓ 9 callers
Function
BuildRef
BuildRef from a path.
schemahcl/spec.go:351
↓ 9 callers
Method
Checksum
Checksum implements Dir.Checksum. By default, it calls Files() and creates a checksum from them.
sql/migrate/dir.go:166
↓ 9 callers
Function
ColumnByRef
ColumnByRef returns a column from the table by its reference.
sql/internal/specutil/convert.go:863
↓ 9 callers
Method
Count
Count returns the count of the given query.
cmd/atlas/internal/migrate/ent/revision_query.go:207
↓ 9 callers
Method
CurrentRevision
CurrentRevision returns the current revision in the revisions table.
cmd/atlas/internal/migrate/migrate.go:40
↓ 9 callers
Function
Database
Database sets the database name to connect to. For example: Database("test")
cmd/atlas/internal/docker/docker.go:342
↓ 9 callers
Function
DetachCycles
DetachCycles takes a list of schema changes, and detaches references between changes if there is at least one circular reference in the changeset. Mor
sql/internal/sqlx/plan.go:98
↓ 9 callers
Function
Env
Env sets the environment variables to pass to the container. For example: Config(Image("mysql"), Env("MYSQL_ROOT_PASSWORD=password")) Config(Image(
cmd/atlas/internal/docker/docker.go:332
↓ 9 callers
Method
Exec
Exec calls tx.Exec.
cmd/atlas/internal/migrate/ent/tx.go:207
↓ 9 callers
Method
ExecuteTo
ExecuteTo executes all pending migration files up to and including version.
sql/migrate/migrate.go:968
↓ 9 callers
Function
FilesLastIndex
FilesLastIndex returns the index of the last file satisfying f(i), or -1 if none do.
sql/migrate/dir.go:850
↓ 9 callers
Method
Hooks
Hooks returns the client hooks.
cmd/atlas/internal/migrate/ent/client.go:318
↓ 9 callers
Function
IsNotExistError
IsNotExistError reports if an error is a NotExistError.
sql/schema/inspect.go:22
↓ 9 callers
Function
ModeInspectRealm
ModeInspectRealm returns the InspectMode or its default.
sql/internal/sqlx/sqlx.go:243
↓ 9 callers
Function
ModeInspectSchema
ModeInspectSchema returns the InspectMode or its default.
sql/internal/sqlx/sqlx.go:235
↓ 9 callers
Function
OpenMemDir
OpenMemDir opens an in-memory directory and registers it in the process namespace with the given name. Hence, calling OpenMemDir with the same name wi
sql/migrate/dir.go:383
↓ 9 callers
Method
Path
Dir returns the path to the temporary directory.
atlasexec/working_dir.go:100
↓ 9 callers
Function
SameSchema
SameSchema reports if the given schemas are the same. Objects can be different as they might reside in two different states (current and desired).
sql/internal/sqlx/plan.go:555
↓ 9 callers
Method
Scan
Scan applies the selector query and scans the result into the given value.
cmd/atlas/internal/migrate/ent/revision_query.go:512
↓ 9 callers
Method
SpecType
SpecType returns the spec type of the object.
sql/internal/specutil/convert.go:78
↓ 9 callers
Method
Sum
Sum returns the checksum of the represented hash file.
sql/migrate/dir.go:693
↓ 9 callers
Method
TableDiff
TableDiff returns a diff report for migrating a table from state "from" to state "to". An error is returned if such step is not possible.
sql/schema/migrate.go:327
↓ 9 callers
Function
TimePrecision
TimePrecision configures the precision of the time type.
sql/schema/dsl.go:537
↓ 9 callers
Method
Total
Total returns the value of the "total" field in the mutation.
cmd/atlas/internal/migrate/ent/mutation.go:322
↓ 9 callers
Method
applyHcl
(spec string)
internal/integration/integration_test.go:136
↓ 9 callers
Method
mariadb
()
internal/integration/mysql_test.go:1501
↓ 9 callers
Function
migrateLintCmd
migrateLintCmd represents the 'atlas migrate lint' subcommand.
cmd/atlas/internal/cmdapi/migrate.go:781
↓ 9 callers
Method
put
(attrs []schema.Attr, typename ...string)
sql/internal/sqlx/dev.go:200
↓ 9 callers
Function
stringVal
(r io.Reader, err error)
atlasexec/atlas.go:518
↓ 8 callers
Method
AddField
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the
cmd/atlas/internal/migrate/ent/mutation.go:956
↓ 8 callers
Function
AliasTypeSpec
AliasTypeSpec returns a TypeSpec with the provided name.
schemahcl/types.go:329
↓ 8 callers
Method
CheckClean
CheckClean checks if the connected realm or schema does not contain any resources besides the revision history table. A NotCleanError is returned in c
sql/migrate/migrate.go:1114
↓ 8 callers
Method
CheckClean
CheckClean implements migrate.CleanChecker.
sql/postgres/driver.go:299
↓ 8 callers
Method
Compare
Compare returns an integer comparing two versions according to semantic version precedence.
sql/mysql/internal/mysqlversion/mysqlversion.go:159
↓ 8 callers
Method
ID
ID returns the current target identifier.
cmd/atlas/internal/migrate/migrate.go:44
← previous
next →
201–300 of 7,770, ranked by callers