MCPcopy Create free account

hub / github.com/ariga/atlas / functions

Functions7,770 in github.com/ariga/atlas

↓ 27 callersMethodReset
Reset the in-memory directory to its initial state.
sql/migrate/dir.go:409
↓ 27 callersFunctionintp
(i int)
internal/integration/mysql_test.go:1554
↓ 27 callersFunctiontypeTime
(t string, p int)
sql/postgres/sqlspec_test.go:1828
↓ 26 callersFunctionMayWrap
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 callersMethodPending
Pending returns all pending (not fully applied) migration files in the migration directory.
sql/migrate/migrate.go:674
↓ 26 callersMethodRealmDiff
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 callersMethodSchema
Schema returns the first schema that matched the given name.
sql/schema/schema.go:124
↓ 26 callersMethodSetType
SetType sets the serial type from the given integer type.
sql/postgres/inspect.go:1271
↓ 26 callersMethodString
String implements fmt.Stringer.
sql/migrate/dir.go:776
↓ 25 callersMethodAddForeignKeys
AddForeignKeys appends the given foreign-keys to the table foreign-key list.
sql/schema/dsl.go:246
↓ 25 callersMethodBuild
Build instantiates a new builder and writes the given phrase to it.
sql/postgres/migrate.go:1196
↓ 25 callersFunctionNewUniqueIndex
NewUniqueIndex creates a new unique index with the given name.
sql/schema/dsl.go:697
↓ 25 callersMethodQuery
Query calls tx.Query.
cmd/atlas/internal/migrate/ent/tx.go:212
↓ 25 callersFunctionStringAttr
StringAttr is a helper method for constructing *schemahcl.Attr instances that contain string value.
schemahcl/spec.go:510
↓ 25 callersMethodUpdate
Update allows overriding fields `UPDATE` values. See the RevisionCreate.OnConflict documentation for more info.
cmd/atlas/internal/migrate/ent/revision_create.go:558
↓ 25 callersMethodUpdate
Update allows overriding fields `UPDATE` values. See the RevisionCreateBulk.OnConflict documentation for more info.
cmd/atlas/internal/migrate/ent/revision_create.go:954
↓ 24 callersMethodAny_name
()
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:32392
↓ 24 callersFunctionBoolAttr
BoolAttr is a helper method for constructing *schemahcl.Attr instances that contain a boolean value.
schemahcl/spec.go:539
↓ 24 callersMethodLock
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 callersFunctionWithScopedEnums
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 callersFunctionliteRun
(t *testing.T, fn func(test *liteTest))
internal/integration/sqlite_test.go:35
↓ 24 callersFunctionschemaApplyCmd
schemaApplyCmd represents the 'atlas schema apply' subcommand.
cmd/atlas/internal/cmdapi/schema.go:84
↓ 23 callersMethodMaria
Maria reports if the MySQL version is MariaDB.
sql/mysql/internal/mysqlversion/mysqlversion.go:148
↓ 23 callersFunctionNewLocalFile
NewLocalFile returns a new local file.
sql/migrate/dir.go:206
↓ 23 callersFunctionschemaCmd
schemaCmd represents the subcommand 'atlas schema'.
cmd/atlas/internal/cmdapi/schema.go:31
↓ 23 callersMethodusers
()
internal/integration/integration_test.go:127
↓ 22 callersMethodAddParts
AddParts appends the given parts.
sql/schema/dsl.go:767
↓ 22 callersFunctionNewEnumColumn
NewEnumColumn creates a new EnumType column.
sql/schema/dsl.go:398
↓ 22 callersFunctionPrecisionTypeAttr
PrecisionTypeAttr returns a TypeAttr for a precision attribute.
schemahcl/types.go:350
↓ 21 callersMethodAnalyze
Analyze executes the analysis function.
sql/sqlcheck/sqlcheck.go:27
↓ 21 callersMethodComma
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 callersFunctionEnumValues
EnumValues configures the values of the enum.
sql/schema/dsl.go:384
↓ 21 callersFunctionEnvByName
EnvByName parses and returns the project configuration with selected environments.
cmd/atlas/internal/cmdapi/project.go:525
↓ 21 callersFunctionNewColumnPart
NewColumnPart creates a new index part with the given column.
sql/schema/dsl.go:782
↓ 21 callersMethodSchema_name
()
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:29961
↓ 21 callersFunctionValidate
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 callersMethodWrap
Wrap wraps the written string with parentheses.
sql/internal/sqlx/sqlx.go:476
↓ 21 callersFunctioncrdbRun
(t *testing.T, fn func(*crdbTest))
internal/integration/cockroach_test.go:38
↓ 21 callersFunctionexecPath
(t testing.TB)
internal/integration/integration_test.go:382
↓ 21 callersMethodloadRealm
()
internal/integration/integration_test.go:126
↓ 20 callersMethodAddOrSkip
AddOrSkip adds the given change to the list of changes if it is not skipped.
sql/schema/migrate.go:400
↓ 20 callersMethodMarshalSpec
MarshalSpec marshals the provided input into a valid Atlas HCL document.
schemahcl/schemahcl.go:293
↓ 20 callersFunctionNewPlanner
NewPlanner creates a new Planner.
sql/migrate/migrate.go:319
↓ 20 callersFunctionRegister
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 callersMethodString
String returns the position in editor/LSP style. Format: "filename:line[:c][-end_line[:end_c]]"
sql/schema/schema.go:558
↓ 20 callersMethoddriver
()
internal/integration/integration_test.go:123
↓ 19 callersFunctionEnumName
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 callersMethodPlanChanges
PlanChanges returns a migration plan for applying the given changeset.
sql/migrate/migrate.go:107
↓ 19 callersFunctionWriteSumFile
WriteSumFile writes the given HashFile to the Dir. If the file does not exist, it is created.
sql/migrate/dir.go:684
↓ 19 callersMethodvalueByVersion
(values map[string]string, defaults string)
internal/integration/mysql_test.go:1454
↓ 18 callersMethodExecuteN
ExecuteN executes n pending migration files. If n<=0 all pending migration files are executed.
sql/migrate/migrate.go:953
↓ 18 callersFunctionIntAttr
IntAttr is a helper method for constructing *schemahcl.Attr instances that contain int64 value.
schemahcl/spec.go:518
↓ 18 callersMethodSetCollation
SetCollation sets or appends the Collation attribute to the realm with the given value.
sql/schema/dsl.go:129
↓ 18 callersMethodStat
Stat returns a zero FileInfo.
sql/migrate/dir.go:943
↓ 18 callersMethodWrite
Write writes the value to the file system.
cmd/atlas/internal/cmdstate/cmdstate.go:47
↓ 18 callersFunctionschemaDiffCmd
schemaDiffCmd represents the 'atlas schema diff' subcommand.
cmd/atlas/internal/cmdapi/schema.go:251
↓ 17 callersMethodChecksum
Checksum returns a HashFile of the migration directory.
sql/migrate/dir.go:39
↓ 17 callersMethodClose
Close removes the temporary directory.
atlasexec/working_dir.go:90
↓ 17 callersMethodErr
()
schemahcl/schemahcl.go:248
↓ 17 callersFunctionFormatType
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 callersMethodMapComma
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 callersMethodMarshalHCL
MarshalHCL returns the default HCL representation of the schema. Used by the template declared above.
cmd/atlas/internal/cmdlog/cmdlog.go:799
↓ 17 callersMethodSetNull
SetNull configures the nullability of the column
sql/schema/dsl.go:590
↓ 17 callersMethodWriteFile
WriteFile adds a new file in-memory.
sql/migrate/dir.go:435
↓ 17 callersMethodappend
(c ...*migrate.Change)
sql/postgres/migrate.go:1191
↓ 17 callersMethoddropSchemas
(...string)
internal/integration/integration_test.go:133
↓ 17 callersMethodloadPosts
()
internal/integration/integration_test.go:130
↓ 17 callersFunctionquote
(s string)
sql/postgres/migrate.go:1274
↓ 16 callersMethodDirective
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 callersFunctionFromURL
FromURL parses a URL in the format of "docker://driver/tag[/dbname]" and returns a Config.
cmd/atlas/internal/docker/docker.go:99
↓ 16 callersMethodIsType
IsType indicates if the attribute is a type spec.
schemahcl/spec.go:128
↓ 16 callersFunctionRunE
RunE wraps the command cobra.Command.RunE function with additional postrun logic.
cmd/atlas/internal/cmdapi/cmdapi.go:149
↓ 16 callersFunctionWithDataSource
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 callersMethoddefaultAttrs
defaultConfig returns the default charset and collation configuration based on the MySQL version.
internal/integration/mysql_test.go:1506
↓ 16 callersFunctionmigrateCmd
migrateCmd represents the subcommand 'atlas migrate'.
cmd/atlas/internal/cmdapi/migrate.go:41
↓ 16 callersMethodnoFKs
()
sql/mysql/inspect_test.go:1087
↓ 15 callersMethodForeignKey
ForeignKey returns the first foreign-key that matched the given symbol (constraint name).
sql/schema/schema.go:221
↓ 15 callersMethodFormat
Format formats the given Plan into one or more migration files.
sql/migrate/dir.go:61
↓ 15 callersMethodIsDir
()
sql/migrate/dir.go:948
↓ 15 callersFunctionNewExprContext
(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int)
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:12000
↓ 15 callersFunctionOpen
Open opens a new PostgreSQL driver.
sql/postgres/driver.go:96
↓ 15 callersFunctionOpen
Open opens a new MySQL driver.
sql/mysql/driver.go:76
↓ 15 callersMethodTable_name
()
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:30075
↓ 15 callersMethodWriteFile
WriteFile implements Dir.WriteFile.
sql/migrate/dir.go:140
↓ 15 callersFunctiondir
(t *testing.T)
sql/sqltool/tool_test.go:420
↓ 15 callersMethoderror
(pos int, format string, args ...any)
sql/migrate/lex.go:532
↓ 15 callersMethodtableExists
(schema, table string, exists bool)
sql/mysql/inspect_test.go:1092
↓ 14 callersMethodClone
Clone returns a duplicate of the builder.
sql/internal/sqlx/sqlx.go:517
↓ 14 callersFunctionEnumSchema
EnumSchema configures the schema of the enum.
sql/schema/dsl.go:391
↓ 14 callersMethodFiles
Files implements Dir.Files. It looks for all files with .sql suffix and orders them by filename.
sql/migrate/dir.go:145
↓ 14 callersFunctionIsQuoted
IsQuoted reports if the given string is quoted with one of the given quotes (e.g. ', ", `).
sql/internal/sqlx/sqlx.go:547
↓ 14 callersFunctionNewCheck
NewCheck creates a new check.
sql/schema/dsl.go:669
↓ 14 callersMethodQuery
Query executes a query that may return rows, such as an SELECT.
sdk/recordriver/driver.go:143
↓ 14 callersMethodReadState
(ctx context.Context)
sql/migrate/migrate.go:139
↓ 14 callersFunctionRegister
Register registers a client Opener (i.e. creator) with the given name.
sql/sqlclient/client.go:489
↓ 14 callersMethodRemain
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 callersMethodSelect_stmt
()
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:16579
↓ 14 callersMethodSetExpr
SetExpr configures the expression of the check constraint.
sql/schema/dsl.go:680
↓ 14 callersMethodString
var reVersion = regexp.MustCompile(`^atlas version v(\d+\.\d+.\d+)-?([a-z0-9]*)?`)
atlasexec/atlas.go:242
↓ 14 callersMethodaddPos
(p int)
sql/migrate/lex.go:303
← previousnext →101–200 of 7,770, ranked by callers