MCPcopy Create free account

hub / github.com/ariga/atlas / functions

Functions7,770 in github.com/ariga/atlas

↓ 873 callersMethodEqual
Equal reports whether o and x are the same operator class.
sql/postgres/inspect.go:1337
↓ 358 callersFunctionNewTable
NewTable creates a new Table.
sql/schema/dsl.go:141
↓ 311 callersFunctionNew
The functions and methods below provide a DSL for creating schema resources using a fluent interface. Note that some methods create links between the
sql/schema/dsl.go:17
↓ 310 callersMethodAddColumns
AddColumns adds the given columns to the view.
sql/schema/dsl.go:157
↓ 296 callersFunctionNewIntColumn
NewIntColumn creates a new IntegerType column.
sql/schema/dsl.go:348
↓ 246 callersMethodP
P writes a list of phrases to the builder separated and suffixed with whitespace.
sql/internal/sqlx/sqlx.go:271
↓ 242 callersMethodRun
Run runs the template and returns the output.
sdk/tmplrun/tmplrun.go:52
↓ 187 callersFunctionHas
Has finds the first element in the elements list that matches target, and if so, sets target to that attribute value and returns true.
sql/internal/sqlx/diff.go:585
↓ 152 callersFunctionrunCmd
(cmd *cobra.Command, args ...string)
cmd/atlas/internal/cmdapi/cmdapi_test.go:31
↓ 151 callersMethodSetError
SetError sets the "error" field.
cmd/atlas/internal/migrate/ent/mutation.go:464
↓ 142 callersFunctionNewColumn
NewColumn creates a new column with the given name.
sql/schema/dsl.go:325
↓ 142 callersFunctionNewTypeSpec
NewTypeSpec returns a TypeSpec with the provided name.
schemahcl/types.go:324
↓ 131 callersMethodWriteFile
WriteFile writes the data to the named file.
sql/migrate/dir.go:33
↓ 124 callersMethodSetSchema
SetSchema sets the schema (named-database) of the table.
sql/schema/dsl.go:210
↓ 116 callersMethodmigrate
(...schema.Change)
internal/integration/integration_test.go:134
↓ 112 callersMethodEnterRule
(listener antlr.ParseTreeListener)
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:12474
↓ 112 callersMethodExitRule
(listener antlr.ParseTreeListener)
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:12480
↓ 109 callersFunctionEscape
Escape escapes all regular expression metacharacters in the given query.
sql/internal/sqltest/sqltest.go:64
↓ 101 callersMethodError
(...any)
cmd/atlas/internal/migrate/ent/enttest/enttest.go:25
↓ 101 callersFunctionensureNoChange
(t T, tables ...*schema.Table)
internal/integration/integration_test.go:636
↓ 96 callersMethodAddTables
AddTables adds and links the given tables to the schema.
sql/schema/dsl.go:67
↓ 94 callersMethodAddAttrs
AddAttrs adds and additional attributes to the table.
sql/schema/dsl.go:255
↓ 93 callersMethoddropTables
(...string)
internal/integration/integration_test.go:132
↓ 92 callersMethodIdent
Ident returns an object identifies this history table.
sql/migrate/migrate.go:225
↓ 86 callersMethodParse
()
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:1640
↓ 84 callersMethodName
Name returns the name of the migration file.
sql/migrate/dir.go:45
↓ 84 callersMethodType
Type extracts the Type from the Attr.
schemahcl/spec.go:203
↓ 83 callersFunctionopenSQLite
openSQLite creates a sqlite db, seeds it with the seed query and returns the url to it.
cmd/atlas/internal/cmdapi/cmdapi_test.go:50
↓ 80 callersMethodIs
Is reports whether m is match the given mode.
sql/schema/migrate.go:356
↓ 78 callersFunctionRows
Rows converts MySQL/PostgreSQL table output to sql.Rows. All row values are parsed as text except the "nil" and NULL keywords. For example: +-------
sql/internal/sqltest/sqltest.go:27
↓ 70 callersMethodloadUsers
()
internal/integration/integration_test.go:128
↓ 69 callersFunctionNewIndex
NewIndex creates a new index with the given name.
sql/schema/dsl.go:692
↓ 68 callersMethodString
String implements pflag.Value.String.
cmd/atlas/internal/cmdapi/cmdapi.go:197
↓ 68 callersMethodTable
Table returns the first table that matched the given name.
sql/schema/schema.go:171
↓ 66 callersFunctionNew
New returns a State configured with options.
schemahcl/schemahcl.go:48
↓ 64 callersMethodEvalBytes
EvalBytes evaluates the data byte-slice as an Atlas HCL document using the input variables and stores the result in v.
schemahcl/schemahcl.go:467
↓ 64 callersFunctionNewRealm
NewRealm creates a new Realm.
sql/schema/dsl.go:91
↓ 64 callersFunctionWithAttributes
WithAttributes returns an attributes TypeSpecOption.
schemahcl/types.go:296
↓ 64 callersMethodexpr
(_p int)
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:12500
↓ 62 callersMethodSetGeneratedExpr
SetGeneratedExpr sets or appends the GeneratedExpr attribute.
sql/schema/dsl.go:647
↓ 60 callersMethodName
(i int)
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:5749
↓ 60 callersMethoddiff
(*schema.Table, *schema.Table)
internal/integration/integration_test.go:135
↓ 56 callersFunctionNewClient
NewClient returns a new Atlas client with the given atlas-cli path.
atlasexec/atlas.go:121
↓ 54 callersMethodBytes
Bytes returns the read content of the file.
sql/migrate/dir.go:51
↓ 53 callersMethodClose
Close implements the io.Closer interface.
sql/migrate/dir.go:415
↓ 52 callersFunctionNewLocalDir
NewLocalDir returns a new the Dir used by a Planner to work on the given local path.
sql/migrate/dir.go:114
↓ 52 callersFunctionNewStringColumn
NewStringColumn creates a new StringType column.
sql/schema/dsl.go:448
↓ 50 callersMethodurl
(string)
internal/integration/integration_test.go:122
↓ 49 callersFunctionOpen
Open opens an Atlas client by its provided url string.
sql/sqlclient/client.go:299
↓ 49 callersMethodSchemaDiff
SchemaDiff returns a diff report for migrating a schema from state "from" to state "to". An error is returned if such step is not possible.
sql/schema/migrate.go:322
↓ 48 callersMethodExecute
Execute executes the given migration file on the database. If it sees a file, that has been partially applied, it will continue with the next statemen
sql/migrate/migrate.go:795
↓ 48 callersMethodNext
Next reads the next item from the stream, making it available by calling Current. It returns false if there are no more items and the stream is closed
atlasexec/atlas.go:309
↓ 48 callersMethodSet
Set implements pflag.Value.Set.
cmd/atlas/internal/cmdapi/cmdapi.go:243
↓ 46 callersMethodAs
As reads the attributes and children resources of the resource into the target struct.
schemahcl/extension.go:93
↓ 46 callersMethodScan
Scan scans the statement in the given input.
sql/migrate/lex.go:134
↓ 45 callersMethodAddIndexes
AddIndexes appends the given indexes to the table index list.
sql/schema/dsl.go:237
↓ 45 callersMethodExec
Exec executes a query that doesn't return rows, such as an CREATE or ALTER TABLE.
sdk/recordriver/driver.go:135
↓ 45 callersFunctionmigrateApplyCmd
()
cmd/atlas/internal/cmdapi/migrate.go:86
↓ 42 callersMethodAttr
(string)
sql/internal/specutil/convert.go:1025
↓ 42 callersMethodRun
Run pulls and starts a new docker container from the Config.
cmd/atlas/internal/docker/docker.go:390
↓ 42 callersMethodValue
Value returns the ent.Value that was dynamically selected and assigned to the Revision. This includes values selected through modifiers, order, etc.
cmd/atlas/internal/migrate/ent/revision.go:162
↓ 40 callersMethodClose
()
cmd/atlas/internal/cmdapi/schema.go:522
↓ 39 callersMethodExecContext
(ctx context.Context, query string, args ...any)
sql/schema/inspect.go:33
↓ 39 callersFunctionSizeTypeAttr
SizeTypeAttr returns a TypeAttr for a size attribute.
schemahcl/types.go:341
↓ 39 callersMethodString
String returns the string representation of the operator class.
sql/postgres/inspect.go:1350
↓ 39 callersFunctionValidString
ValidString reports if the given string is not null and valid.
sql/internal/sqlx/sqlx.go:59
↓ 39 callersFunctionmyRun
(t *testing.T, fn func(*myTest))
internal/integration/mysql_test.go:44
↓ 38 callersMethodApplyChanges
ApplyChanges is responsible for applying the given changeset. An error may return from ApplyChanges if the driver is unable to execute a change.
sql/migrate/migrate.go:112
↓ 38 callersMethodIndex
Index returns the first index that matched the given name.
sql/schema/schema.go:211
↓ 38 callersMethodInspectRealm
InspectRealm returns the description of the connected database.
sql/schema/inspect.go:155
↓ 38 callersMethodInspectSchema
InspectSchema returns the schema description by its name. An empty name means the "attached schema" (e.g. SCHEMA() in MySQL or CURRENT_SCHEMA() in Pos
sql/schema/inspect.go:152
↓ 37 callersMethodFiles
Files returns a set of files stored in this Dir to be executed on a database.
sql/migrate/dir.go:36
↓ 37 callersMethodString
String overrides the Buffer.String method and ensure no spaces pad the returned statement.
sql/internal/sqlx/sqlx.go:526
↓ 37 callersMethodVersion
Version returns the version of the migration File.
sql/migrate/dir.go:49
↓ 37 callersFunctionmaySetFlag
maySetFlag sets the flag with the provided name to envVal if such a flag exists on the cmd, it was not set by the user via the command line and if env
cmd/atlas/internal/cmdapi/cmdapi.go:441
↓ 37 callersFunctionpgRun
(t *testing.T, fn func(*pgTest))
internal/integration/postgres_test.go:47
↓ 36 callersMethodOpen
(ctx context.Context, u *url.URL)
sql/sqlclient/client.go:233
↓ 36 callersMethodSetComment
SetComment sets or appends the Comment attribute to the view with the given value.
sql/schema/dsl.go:151
↓ 36 callersFunctionlistString
(args []string)
atlasexec/atlas.go:583
↓ 35 callersMethodColumn
Column returns the first column that matched the given name.
sql/schema/schema.go:191
↓ 35 callersFunctionNewExecutor
NewExecutor creates a new Executor with default values.
sql/migrate/migrate.go:586
↓ 34 callersFunctionNewPrimaryKey
NewPrimaryKey creates a new primary-key index for the given columns.
sql/schema/dsl.go:703
↓ 34 callersMethodSetPrimaryKey
SetPrimaryKey sets the primary-key of the table.
sql/schema/dsl.go:216
↓ 33 callersMethodKind
()
schemahcl/extension.go:698
↓ 33 callersFunctionNewForeignKey
NewForeignKey creates a new foreign-key with the given constraints/symbol name.
sql/schema/dsl.go:813
↓ 33 callersMethodSetCharset
SetCharset sets or appends the Charset attribute to the realm with the given value.
sql/schema/dsl.go:116
↓ 32 callersFunctionNewTimeColumn
NewTimeColumn creates a new TimeType column.
sql/schema/dsl.go:551
↓ 32 callersFunctionReplaceOrAppend
ReplaceOrAppend searches an attribute of the same type as v in the list and replaces it. Otherwise, v is appended to the list.
sql/schema/dsl.go:875
↓ 32 callersMethodString
()
internal/ci/main.go:240
↓ 32 callersMethodrunCommand
runCommand runs the given command and returns its output.
atlasexec/atlas.go:294
↓ 31 callersMethodAddRefColumns
AddRefColumns appends columns to the parent-table columns.
sql/schema/dsl.go:850
↓ 31 callersMethodSetRefTable
SetRefTable configures the referenced/parent table.
sql/schema/dsl.go:844
↓ 30 callersMethodAsArgs
AsArgs returns the variables as arguments.
atlasexec/atlas.go:58
↓ 30 callersMethodElem
()
schemahcl/extension.go:697
↓ 30 callersFunctiontidbRun
(t *testing.T, fn func(*myTest))
internal/integration/tidb_test.go:26
↓ 29 callersMethodCheck
Check if the path index is valid.
schemahcl/spec.go:258
↓ 29 callersMethodColumn_name
()
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:30303
↓ 29 callersMethodQueryContext
(ctx context.Context, query string, args ...any)
sql/schema/inspect.go:32
↓ 29 callersMethodSetField
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the f
cmd/atlas/internal/migrate/ent/mutation.go:834
↓ 28 callersMethodGet
Get returns a Revision entity by its id.
cmd/atlas/internal/migrate/ent/client.go:304
next →1–100 of 7,770, ranked by callers