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
↓ 873 callers
Method
Equal
Equal reports whether o and x are the same operator class.
sql/postgres/inspect.go:1337
↓ 358 callers
Function
NewTable
NewTable creates a new Table.
sql/schema/dsl.go:141
↓ 311 callers
Function
New
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 callers
Method
AddColumns
AddColumns adds the given columns to the view.
sql/schema/dsl.go:157
↓ 296 callers
Function
NewIntColumn
NewIntColumn creates a new IntegerType column.
sql/schema/dsl.go:348
↓ 246 callers
Method
P
P writes a list of phrases to the builder separated and suffixed with whitespace.
sql/internal/sqlx/sqlx.go:271
↓ 242 callers
Method
Run
Run runs the template and returns the output.
sdk/tmplrun/tmplrun.go:52
↓ 187 callers
Function
Has
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 callers
Function
runCmd
(cmd *cobra.Command, args ...string)
cmd/atlas/internal/cmdapi/cmdapi_test.go:31
↓ 151 callers
Method
SetError
SetError sets the "error" field.
cmd/atlas/internal/migrate/ent/mutation.go:464
↓ 142 callers
Function
NewColumn
NewColumn creates a new column with the given name.
sql/schema/dsl.go:325
↓ 142 callers
Function
NewTypeSpec
NewTypeSpec returns a TypeSpec with the provided name.
schemahcl/types.go:324
↓ 131 callers
Method
WriteFile
WriteFile writes the data to the named file.
sql/migrate/dir.go:33
↓ 124 callers
Method
SetSchema
SetSchema sets the schema (named-database) of the table.
sql/schema/dsl.go:210
↓ 116 callers
Method
migrate
(...schema.Change)
internal/integration/integration_test.go:134
↓ 112 callers
Method
EnterRule
(listener antlr.ParseTreeListener)
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:12474
↓ 112 callers
Method
ExitRule
(listener antlr.ParseTreeListener)
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:12480
↓ 109 callers
Function
Escape
Escape escapes all regular expression metacharacters in the given query.
sql/internal/sqltest/sqltest.go:64
↓ 101 callers
Method
Error
(...any)
cmd/atlas/internal/migrate/ent/enttest/enttest.go:25
↓ 101 callers
Function
ensureNoChange
(t T, tables ...*schema.Table)
internal/integration/integration_test.go:636
↓ 96 callers
Method
AddTables
AddTables adds and links the given tables to the schema.
sql/schema/dsl.go:67
↓ 94 callers
Method
AddAttrs
AddAttrs adds and additional attributes to the table.
sql/schema/dsl.go:255
↓ 93 callers
Method
dropTables
(...string)
internal/integration/integration_test.go:132
↓ 92 callers
Method
Ident
Ident returns an object identifies this history table.
sql/migrate/migrate.go:225
↓ 86 callers
Method
Parse
()
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:1640
↓ 84 callers
Method
Name
Name returns the name of the migration file.
sql/migrate/dir.go:45
↓ 84 callers
Method
Type
Type extracts the Type from the Attr.
schemahcl/spec.go:203
↓ 83 callers
Function
openSQLite
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 callers
Method
Is
Is reports whether m is match the given mode.
sql/schema/migrate.go:356
↓ 78 callers
Function
Rows
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 callers
Method
loadUsers
()
internal/integration/integration_test.go:128
↓ 69 callers
Function
NewIndex
NewIndex creates a new index with the given name.
sql/schema/dsl.go:692
↓ 68 callers
Method
String
String implements pflag.Value.String.
cmd/atlas/internal/cmdapi/cmdapi.go:197
↓ 68 callers
Method
Table
Table returns the first table that matched the given name.
sql/schema/schema.go:171
↓ 66 callers
Function
New
New returns a State configured with options.
schemahcl/schemahcl.go:48
↓ 64 callers
Method
EvalBytes
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 callers
Function
NewRealm
NewRealm creates a new Realm.
sql/schema/dsl.go:91
↓ 64 callers
Function
WithAttributes
WithAttributes returns an attributes TypeSpecOption.
schemahcl/types.go:296
↓ 64 callers
Method
expr
(_p int)
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:12500
↓ 62 callers
Method
SetGeneratedExpr
SetGeneratedExpr sets or appends the GeneratedExpr attribute.
sql/schema/dsl.go:647
↓ 60 callers
Method
Name
(i int)
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:5749
↓ 60 callers
Method
diff
(*schema.Table, *schema.Table)
internal/integration/integration_test.go:135
↓ 56 callers
Function
NewClient
NewClient returns a new Atlas client with the given atlas-cli path.
atlasexec/atlas.go:121
↓ 54 callers
Method
Bytes
Bytes returns the read content of the file.
sql/migrate/dir.go:51
↓ 53 callers
Method
Close
Close implements the io.Closer interface.
sql/migrate/dir.go:415
↓ 52 callers
Function
NewLocalDir
NewLocalDir returns a new the Dir used by a Planner to work on the given local path.
sql/migrate/dir.go:114
↓ 52 callers
Function
NewStringColumn
NewStringColumn creates a new StringType column.
sql/schema/dsl.go:448
↓ 50 callers
Method
url
(string)
internal/integration/integration_test.go:122
↓ 49 callers
Function
Open
Open opens an Atlas client by its provided url string.
sql/sqlclient/client.go:299
↓ 49 callers
Method
SchemaDiff
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 callers
Method
Execute
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 callers
Method
Next
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 callers
Method
Set
Set implements pflag.Value.Set.
cmd/atlas/internal/cmdapi/cmdapi.go:243
↓ 46 callers
Method
As
As reads the attributes and children resources of the resource into the target struct.
schemahcl/extension.go:93
↓ 46 callers
Method
Scan
Scan scans the statement in the given input.
sql/migrate/lex.go:134
↓ 45 callers
Method
AddIndexes
AddIndexes appends the given indexes to the table index list.
sql/schema/dsl.go:237
↓ 45 callers
Method
Exec
Exec executes a query that doesn't return rows, such as an CREATE or ALTER TABLE.
sdk/recordriver/driver.go:135
↓ 45 callers
Function
migrateApplyCmd
()
cmd/atlas/internal/cmdapi/migrate.go:86
↓ 42 callers
Method
Attr
(string)
sql/internal/specutil/convert.go:1025
↓ 42 callers
Method
Run
Run pulls and starts a new docker container from the Config.
cmd/atlas/internal/docker/docker.go:390
↓ 42 callers
Method
Value
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 callers
Method
Close
()
cmd/atlas/internal/cmdapi/schema.go:522
↓ 39 callers
Method
ExecContext
(ctx context.Context, query string, args ...any)
sql/schema/inspect.go:33
↓ 39 callers
Function
SizeTypeAttr
SizeTypeAttr returns a TypeAttr for a size attribute.
schemahcl/types.go:341
↓ 39 callers
Method
String
String returns the string representation of the operator class.
sql/postgres/inspect.go:1350
↓ 39 callers
Function
ValidString
ValidString reports if the given string is not null and valid.
sql/internal/sqlx/sqlx.go:59
↓ 39 callers
Function
myRun
(t *testing.T, fn func(*myTest))
internal/integration/mysql_test.go:44
↓ 38 callers
Method
ApplyChanges
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 callers
Method
Index
Index returns the first index that matched the given name.
sql/schema/schema.go:211
↓ 38 callers
Method
InspectRealm
InspectRealm returns the description of the connected database.
sql/schema/inspect.go:155
↓ 38 callers
Method
InspectSchema
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 callers
Method
Files
Files returns a set of files stored in this Dir to be executed on a database.
sql/migrate/dir.go:36
↓ 37 callers
Method
String
String overrides the Buffer.String method and ensure no spaces pad the returned statement.
sql/internal/sqlx/sqlx.go:526
↓ 37 callers
Method
Version
Version returns the version of the migration File.
sql/migrate/dir.go:49
↓ 37 callers
Function
maySetFlag
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 callers
Function
pgRun
(t *testing.T, fn func(*pgTest))
internal/integration/postgres_test.go:47
↓ 36 callers
Method
Open
(ctx context.Context, u *url.URL)
sql/sqlclient/client.go:233
↓ 36 callers
Method
SetComment
SetComment sets or appends the Comment attribute to the view with the given value.
sql/schema/dsl.go:151
↓ 36 callers
Function
listString
(args []string)
atlasexec/atlas.go:583
↓ 35 callers
Method
Column
Column returns the first column that matched the given name.
sql/schema/schema.go:191
↓ 35 callers
Function
NewExecutor
NewExecutor creates a new Executor with default values.
sql/migrate/migrate.go:586
↓ 34 callers
Function
NewPrimaryKey
NewPrimaryKey creates a new primary-key index for the given columns.
sql/schema/dsl.go:703
↓ 34 callers
Method
SetPrimaryKey
SetPrimaryKey sets the primary-key of the table.
sql/schema/dsl.go:216
↓ 33 callers
Method
Kind
()
schemahcl/extension.go:698
↓ 33 callers
Function
NewForeignKey
NewForeignKey creates a new foreign-key with the given constraints/symbol name.
sql/schema/dsl.go:813
↓ 33 callers
Method
SetCharset
SetCharset sets or appends the Charset attribute to the realm with the given value.
sql/schema/dsl.go:116
↓ 32 callers
Function
NewTimeColumn
NewTimeColumn creates a new TimeType column.
sql/schema/dsl.go:551
↓ 32 callers
Function
ReplaceOrAppend
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 callers
Method
String
()
internal/ci/main.go:240
↓ 32 callers
Method
runCommand
runCommand runs the given command and returns its output.
atlasexec/atlas.go:294
↓ 31 callers
Method
AddRefColumns
AddRefColumns appends columns to the parent-table columns.
sql/schema/dsl.go:850
↓ 31 callers
Method
SetRefTable
SetRefTable configures the referenced/parent table.
sql/schema/dsl.go:844
↓ 30 callers
Method
AsArgs
AsArgs returns the variables as arguments.
atlasexec/atlas.go:58
↓ 30 callers
Method
Elem
()
schemahcl/extension.go:697
↓ 30 callers
Function
tidbRun
(t *testing.T, fn func(*myTest))
internal/integration/tidb_test.go:26
↓ 29 callers
Method
Check
Check if the path index is valid.
schemahcl/spec.go:258
↓ 29 callers
Method
Column_name
()
cmd/atlas/internal/sqlparse/sqliteparse/parser.go:30303
↓ 29 callers
Method
QueryContext
(ctx context.Context, query string, args ...any)
sql/schema/inspect.go:32
↓ 29 callers
Method
SetField
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 callers
Method
Get
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