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
↓ 27 callers
Method
Reset
Reset the in-memory directory to its initial state.
sql/migrate/dir.go:409
↓ 27 callers
Function
intp
(i int)
internal/integration/mysql_test.go:1554
↓ 27 callers
Function
typeTime
(t string, p int)
sql/postgres/sqlspec_test.go:1828
↓ 26 callers
Function
MayWrap
MayWrap ensures the given string is wrapped with parentheses. Used by the different drivers to turn strings valid expressions.
sql/internal/sqlx/sqlx.go:606
↓ 26 callers
Method
Pending
Pending returns all pending (not fully applied) migration files in the migration directory.
sql/migrate/migrate.go:674
↓ 26 callers
Method
RealmDiff
RealmDiff returns a diff report for migrating a realm (or a database) from state "from" to state "to". An error is returned if such step is not possib
sql/schema/migrate.go:317
↓ 26 callers
Method
Schema
Schema returns the first schema that matched the given name.
sql/schema/schema.go:124
↓ 26 callers
Method
SetType
SetType sets the serial type from the given integer type.
sql/postgres/inspect.go:1271
↓ 26 callers
Method
String
String implements fmt.Stringer.
sql/migrate/dir.go:776
↓ 25 callers
Method
AddForeignKeys
AddForeignKeys appends the given foreign-keys to the table foreign-key list.
sql/schema/dsl.go:246
↓ 25 callers
Method
Build
Build instantiates a new builder and writes the given phrase to it.
sql/postgres/migrate.go:1196
↓ 25 callers
Function
NewUniqueIndex
NewUniqueIndex creates a new unique index with the given name.
sql/schema/dsl.go:697
↓ 25 callers
Method
Query
Query calls tx.Query.
cmd/atlas/internal/migrate/ent/tx.go:212
↓ 25 callers
Function
StringAttr
StringAttr is a helper method for constructing *schemahcl.Attr instances that contain string value.
schemahcl/spec.go:510
↓ 25 callers
Method
Update
Update allows overriding fields `UPDATE` values. See the RevisionCreate.OnConflict documentation for more info.
cmd/atlas/internal/migrate/ent/revision_create.go:558
↓ 25 callers
Method
Update
Update allows overriding fields `UPDATE` values. See the RevisionCreateBulk.OnConflict documentation for more info.
cmd/atlas/internal/migrate/ent/revision_create.go:954
↓ 24 callers
Method
Any_name
()
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:32392
↓ 24 callers
Function
BoolAttr
BoolAttr is a helper method for constructing *schemahcl.Attr instances that contain a boolean value.
schemahcl/spec.go:539
↓ 24 callers
Method
Lock
Lock acquires a named "advisory lock", using the given timeout. Negative value means no timeout, and the zero value means a "try lock" mode. i.e. retu
sql/schema/migrate.go:426
↓ 24 callers
Function
WithScopedEnums
WithScopedEnums configured a list of allowed ENUMs to be used in the given context, block or attribute. For example, the following option allows setti
schemahcl/schemahcl.go:95
↓ 24 callers
Function
liteRun
(t *testing.T, fn func(test *liteTest))
internal/integration/sqlite_test.go:35
↓ 24 callers
Function
schemaApplyCmd
schemaApplyCmd represents the 'atlas schema apply' subcommand.
cmd/atlas/internal/cmdapi/schema.go:84
↓ 23 callers
Method
Maria
Maria reports if the MySQL version is MariaDB.
sql/mysql/internal/mysqlversion/mysqlversion.go:148
↓ 23 callers
Function
NewLocalFile
NewLocalFile returns a new local file.
sql/migrate/dir.go:206
↓ 23 callers
Function
schemaCmd
schemaCmd represents the subcommand 'atlas schema'.
cmd/atlas/internal/cmdapi/schema.go:31
↓ 23 callers
Method
users
()
internal/integration/integration_test.go:127
↓ 22 callers
Method
AddParts
AddParts appends the given parts.
sql/schema/dsl.go:767
↓ 22 callers
Function
NewEnumColumn
NewEnumColumn creates a new EnumType column.
sql/schema/dsl.go:398
↓ 22 callers
Function
PrecisionTypeAttr
PrecisionTypeAttr returns a TypeAttr for a precision attribute.
schemahcl/types.go:350
↓ 21 callers
Method
Analyze
Analyze executes the analysis function.
sql/sqlcheck/sqlcheck.go:27
↓ 21 callers
Method
Comma
Comma writes a comma in case the buffer is not empty, or replaces the last char if it is a whitespace.
sql/internal/sqlx/sqlx.go:409
↓ 21 callers
Function
EnumValues
EnumValues configures the values of the enum.
sql/schema/dsl.go:384
↓ 21 callers
Function
EnvByName
EnvByName parses and returns the project configuration with selected environments.
cmd/atlas/internal/cmdapi/project.go:525
↓ 21 callers
Function
NewColumnPart
NewColumnPart creates a new index part with the given column.
sql/schema/dsl.go:782
↓ 21 callers
Method
Schema_name
()
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:29961
↓ 21 callers
Function
Validate
Validate checks if the migration dir is in sync with its sum file. If they don't match ErrChecksumMismatch is returned.
sql/migrate/dir.go:790
↓ 21 callers
Method
Wrap
Wrap wraps the written string with parentheses.
sql/internal/sqlx/sqlx.go:476
↓ 21 callers
Function
crdbRun
(t *testing.T, fn func(*crdbTest))
internal/integration/cockroach_test.go:38
↓ 21 callers
Function
execPath
(t testing.TB)
internal/integration/integration_test.go:382
↓ 21 callers
Method
loadRealm
()
internal/integration/integration_test.go:126
↓ 20 callers
Method
AddOrSkip
AddOrSkip adds the given change to the list of changes if it is not skipped.
sql/schema/migrate.go:400
↓ 20 callers
Method
MarshalSpec
MarshalSpec marshals the provided input into a valid Atlas HCL document.
schemahcl/schemahcl.go:293
↓ 20 callers
Function
NewPlanner
NewPlanner creates a new Planner.
sql/migrate/migrate.go:319
↓ 20 callers
Function
Register
Register records the type of ext in the global extension registry. If Register is called twice with the same name or if ext is nil, it panics.
schemahcl/extension.go:80
↓ 20 callers
Method
String
String returns the position in editor/LSP style. Format: "filename:line[:c][-end_line[:end_c]]"
sql/schema/schema.go:558
↓ 20 callers
Method
driver
()
internal/integration/integration_test.go:123
↓ 19 callers
Function
EnumName
EnumName configures the name of the name. This option is useful for databases like PostgreSQL that supports user-defined types for enums.
sql/schema/dsl.go:377
↓ 19 callers
Method
PlanChanges
PlanChanges returns a migration plan for applying the given changeset.
sql/migrate/migrate.go:107
↓ 19 callers
Function
WriteSumFile
WriteSumFile writes the given HashFile to the Dir. If the file does not exist, it is created.
sql/migrate/dir.go:684
↓ 19 callers
Method
valueByVersion
(values map[string]string, defaults string)
internal/integration/mysql_test.go:1454
↓ 18 callers
Method
ExecuteN
ExecuteN executes n pending migration files. If n<=0 all pending migration files are executed.
sql/migrate/migrate.go:953
↓ 18 callers
Function
IntAttr
IntAttr is a helper method for constructing *schemahcl.Attr instances that contain int64 value.
schemahcl/spec.go:518
↓ 18 callers
Method
SetCollation
SetCollation sets or appends the Collation attribute to the realm with the given value.
sql/schema/dsl.go:129
↓ 18 callers
Method
Stat
Stat returns a zero FileInfo.
sql/migrate/dir.go:943
↓ 18 callers
Method
Write
Write writes the value to the file system.
cmd/atlas/internal/cmdstate/cmdstate.go:47
↓ 18 callers
Function
schemaDiffCmd
schemaDiffCmd represents the 'atlas schema diff' subcommand.
cmd/atlas/internal/cmdapi/schema.go:251
↓ 17 callers
Method
Checksum
Checksum returns a HashFile of the migration directory.
sql/migrate/dir.go:39
↓ 17 callers
Method
Close
Close removes the temporary directory.
atlasexec/working_dir.go:90
↓ 17 callers
Method
Err
()
schemahcl/schemahcl.go:248
↓ 17 callers
Function
FormatType
FormatType converts schema type to its column form in the database. An error is returned if the type cannot be recognized.
sql/postgres/convert.go:19
↓ 17 callers
Method
MapComma
MapComma maps the slice x using the function f and joins the result with a comma separating between the written elements.
sql/internal/sqlx/sqlx.go:423
↓ 17 callers
Method
MarshalHCL
MarshalHCL returns the default HCL representation of the schema. Used by the template declared above.
cmd/atlas/internal/cmdlog/cmdlog.go:799
↓ 17 callers
Method
SetNull
SetNull configures the nullability of the column
sql/schema/dsl.go:590
↓ 17 callers
Method
WriteFile
WriteFile adds a new file in-memory.
sql/migrate/dir.go:435
↓ 17 callers
Method
append
(c ...*migrate.Change)
sql/postgres/migrate.go:1191
↓ 17 callers
Method
dropSchemas
(...string)
internal/integration/integration_test.go:133
↓ 17 callers
Method
loadPosts
()
internal/integration/integration_test.go:130
↓ 17 callers
Function
quote
(s string)
sql/postgres/migrate.go:1274
↓ 16 callers
Method
Directive
Directive returns the (global) file directives that match the provided name. File directives are located at the top of the file and should not be asso
sql/migrate/dir.go:307
↓ 16 callers
Function
FromURL
FromURL parses a URL in the format of "docker://driver/tag[/dbname]" and returns a Config.
cmd/atlas/internal/docker/docker.go:99
↓ 16 callers
Method
IsType
IsType indicates if the attribute is a type spec.
schemahcl/spec.go:128
↓ 16 callers
Function
RunE
RunE wraps the command cobra.Command.RunE function with additional postrun logic.
cmd/atlas/internal/cmdapi/cmdapi.go:149
↓ 16 callers
Function
WithDataSource
WithDataSource registers a data source name and its corresponding handler. e.g., the example below registers a data source named "text" that returns t
schemahcl/schemahcl.go:158
↓ 16 callers
Method
defaultAttrs
defaultConfig returns the default charset and collation configuration based on the MySQL version.
internal/integration/mysql_test.go:1506
↓ 16 callers
Function
migrateCmd
migrateCmd represents the subcommand 'atlas migrate'.
cmd/atlas/internal/cmdapi/migrate.go:41
↓ 16 callers
Method
noFKs
()
sql/mysql/inspect_test.go:1087
↓ 15 callers
Method
ForeignKey
ForeignKey returns the first foreign-key that matched the given symbol (constraint name).
sql/schema/schema.go:221
↓ 15 callers
Method
Format
Format formats the given Plan into one or more migration files.
sql/migrate/dir.go:61
↓ 15 callers
Method
IsDir
()
sql/migrate/dir.go:948
↓ 15 callers
Function
NewExprContext
(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int)
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:12000
↓ 15 callers
Function
Open
Open opens a new PostgreSQL driver.
sql/postgres/driver.go:96
↓ 15 callers
Function
Open
Open opens a new MySQL driver.
sql/mysql/driver.go:76
↓ 15 callers
Method
Table_name
()
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:30075
↓ 15 callers
Method
WriteFile
WriteFile implements Dir.WriteFile.
sql/migrate/dir.go:140
↓ 15 callers
Function
dir
(t *testing.T)
sql/sqltool/tool_test.go:420
↓ 15 callers
Method
error
(pos int, format string, args ...any)
sql/migrate/lex.go:532
↓ 15 callers
Method
tableExists
(schema, table string, exists bool)
sql/mysql/inspect_test.go:1092
↓ 14 callers
Method
Clone
Clone returns a duplicate of the builder.
sql/internal/sqlx/sqlx.go:517
↓ 14 callers
Function
EnumSchema
EnumSchema configures the schema of the enum.
sql/schema/dsl.go:391
↓ 14 callers
Method
Files
Files implements Dir.Files. It looks for all files with .sql suffix and orders them by filename.
sql/migrate/dir.go:145
↓ 14 callers
Function
IsQuoted
IsQuoted reports if the given string is quoted with one of the given quotes (e.g. ', ", `).
sql/internal/sqlx/sqlx.go:547
↓ 14 callers
Function
NewCheck
NewCheck creates a new check.
sql/schema/dsl.go:669
↓ 14 callers
Method
Query
Query executes a query that may return rows, such as an SELECT.
sdk/recordriver/driver.go:143
↓ 14 callers
Method
ReadState
(ctx context.Context)
sql/migrate/migrate.go:139
↓ 14 callers
Function
Register
Register registers a client Opener (i.e. creator) with the given name.
sql/sqlclient/client.go:489
↓ 14 callers
Method
Remain
Remain returns a resource representing any extra children and attributes that are related to the struct but were not mapped to any of its fields.
schemahcl/extension.go:24
↓ 14 callers
Method
Select_stmt
()
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:16579
↓ 14 callers
Method
SetExpr
SetExpr configures the expression of the check constraint.
sql/schema/dsl.go:680
↓ 14 callers
Method
String
var reVersion = regexp.MustCompile(`^atlas version v(\d+\.\d+.\d+)-?([a-z0-9]*)?`)
atlasexec/atlas.go:242
↓ 14 callers
Method
addPos
(p int)
sql/migrate/lex.go:303
← previous
next →
101–200 of 7,770, ranked by callers