MCPcopy Create free account

hub / github.com/alexisvisco/amigo / functions

Functions123 in github.com/alexisvisco/amigo

↓ 17 callersMethodExecContext
ExecContext intercepts exec calls within a transaction
pkg/logsql/driver.go:374
↓ 13 callersMethoderror
error formats an error message in red
cli_output.go:37
↓ 10 callersMethodName
()
types.go:52
↓ 9 callersMethodDate
()
types.go:38
↓ 7 callersFunctioncontains
(s, substr string)
pkg/logsql/driver.go:123
↓ 6 callersMethodErr
Err returns the first error that occurred during the chain, or nil if no errors occurred
utils.go:73
↓ 5 callersMethodRun
Run executes the CLI with the given arguments This is the main entry point that should be called from your main function
cli.go:88
↓ 4 callersMethodGetMigrationsStatuses
(ctx context.Context, migrations []Migration)
runner_get_migrations_statuses.go:9
↓ 4 callersMethodQueryContext
QueryContext intercepts query calls within a transaction
pkg/logsql/driver.go:415
↓ 4 callersFunctionSQLFileToMigration
SQLFileToMigration converts a sql file from an embedded filesystem to a Migration struct
sql_migration.go:88
↓ 4 callersFunctionTx
(ctx context.Context, db *sql.DB, f func(*sql.Tx) error)
utils.go:9
↓ 4 callersFunctionformatArgs
formatArgs formats arguments for display
pkg/logsql/driver.go:473
↓ 4 callersMethodlogQuery
(operation string, args interface{}, duration time.Duration, err error)
pkg/logsql/driver.go:249
↓ 4 callersFunctionnamedValuesToValues
Helper functions to convert between driver value types
pkg/logsql/driver.go:456
↓ 3 callersMethodCreateSchemaMigrationsTableIfNotExists
(ctx context.Context, db *sql.DB)
types.go:48
↓ 3 callersMethodGetAppliedMigrations
(ctx context.Context, db *sql.DB)
types.go:49
↓ 3 callersMethodOpen
(name string)
pkg/logsql/driver.go:134
↓ 3 callersMethodPrepareContext
PrepareContext creates a prepared statement within the transaction
pkg/logsql/driver.go:362
↓ 3 callersMethodcliPrintHelp
cliPrintHelp displays the help message
cli.go:118
↓ 3 callersMethoddate
date formats a date/timestamp integer (YYYYMMDDHHMMSS) in green
cli_output.go:52
↓ 3 callersMethodpath
path formats a file path in cyan
cli_output.go:26
↓ 3 callersFunctionsplitSQLStatementsWithAnnotations
splitSQLStatementsWithAnnotations splits a SQL string into individual statements, respecting -- amigo:statement:begin/end annotations that protect com
sql_migration.go:222
↓ 2 callersMethodDownIterator
DownIterator returns an iterator that yields migration results as they are reverted
runner_down_iterator.go:11
↓ 2 callersMethodExec
Exec executes a SQL statement. If a previous error occurred, this is a no-op.
utils.go:64
↓ 2 callersFunctionNewCLI
NewCLI creates a new CLI instance with the given configuration
cli.go:53
↓ 2 callersFunctionNewChainExecTx
NewChainExecTx creates a new ChainExecTx for the given context and transaction
utils.go:97
↓ 2 callersMethodPrepare
Prepare creates a prepared statement within the transaction
pkg/logsql/driver.go:351
↓ 2 callersMethodRollback
()
pkg/logsql/driver.go:341
↓ 2 callersMethodUpIterator
UpIterator returns an iterator that yields migration results as they are applied
runner_up_iterator.go:18
↓ 2 callersFunctionWrapDriver
WrapDriver wraps a SQL driver to log all queries Returns the wrapped driver name to use with sql.Open()
pkg/logsql/driver.go:72
↓ 2 callersFunctionWrapOptionOutput
WrapOptionOutput sets the output writer for SQL logs
pkg/logsql/driver.go:50
↓ 2 callersMethodcliGenerateHelp
cliGenerateHelp displays help for the generate command
cli_cmd_generate.go:157
↓ 2 callersMethodduration
duration formats a duration in yellow (in milliseconds)
cli_output.go:31
↓ 2 callersMethodexecSQL
execSQL executes SQL within a transaction, either as a single exec or split by statements
sql_migration.go:48
↓ 2 callersMethodexecSQLDB
execSQLDB executes SQL on a DB, either as a single exec or split by statements
sql_migration.go:64
↓ 2 callersMethodlogQuery
(txPrefix, operation, query string, args interface{}, duration time.Duration, err error)
pkg/logsql/driver.go:173
↓ 2 callersMethodlogQuery
(operation, query string, duration time.Duration, err error)
pkg/logsql/driver.go:319
↓ 2 callersFunctionnamedValuesToDriverValues
(args []driver.NamedValue)
pkg/logsql/driver.go:464
↓ 2 callersFunctionparseFileName
parseFileName parses the migration file name to extract the name and date ex: "20240101120000_create_users_table.sql" -> gives "20240101120000", "cr
sql_migration.go:112
↓ 2 callersFunctionparseSQLFile
parseSQLFile parses the content of a SQL file into an SQLMigration struct It looks for the up and down annotations to split the file into up and down
sql_migration.go:159
↓ 2 callersFunctionparseTxAnnotation
parseTxAnnotation parses the tx annotation from the given text and sets the value of b accordingly A typical refexp is regexp.MustCompile(`tx=(true|fa
sql_migration.go:203
↓ 2 callersFunctionsanitizeName
sanitizeName converts a migration name to a valid Go identifier
cli_cmd_generate.go:145
↓ 2 callersMethodtimestamp
timestamp formats a timestamp in green
cli_output.go:42
↓ 1 callersMethodBegin
()
pkg/logsql/driver.go:212
↓ 1 callersMethodBeginTx
(ctx context.Context, opts driver.TxOptions)
pkg/logsql/driver.go:225
↓ 1 callersMethodCommit
()
pkg/logsql/driver.go:332
↓ 1 callersMethodDeleteMigrations
(ctx context.Context, db *sql.DB, dates []int64)
types.go:51
↓ 1 callersMethodDown
(ctx context.Context, db *sql.DB)
types.go:36
↓ 1 callersMethodExec
(args []driver.Value)
pkg/logsql/driver.go:274
↓ 1 callersMethodInsertMigrations
(ctx context.Context, db *sql.DB, list []MigrationRecord)
types.go:50
↓ 1 callersFunctionNewPostgresDriver
(tableName string)
driver_pg.go:14
↓ 1 callersFunctionNewRunner
(config Configuration)
runner.go:13
↓ 1 callersFunctionNewSQLiteDriver
(tableName string)
driver_sqlite.go:14
↓ 1 callersMethodPrepare
(query string)
pkg/logsql/driver.go:193
↓ 1 callersMethodQuery
(args []driver.Value)
pkg/logsql/driver.go:282
↓ 1 callersFunctionRunnerDownOptionSteps
(steps int)
runner_down.go:13
↓ 1 callersFunctionRunnerUpOptionSteps
(steps int)
runner_up.go:13
↓ 1 callersMethodUp
(ctx context.Context, db *sql.DB)
types.go:35
↓ 1 callersMethodcliDown
cliDown reverts applied migrations
cli_cmd_down.go:15
↓ 1 callersMethodcliDownHelp
cliDownHelp displays help for the down command
cli_cmd_down.go:126
↓ 1 callersMethodcliGenerate
cliGenerate creates a new migration file
cli_cmd_generate.go:15
↓ 1 callersMethodcliShowConfig
cliShowConfig displays the current configuration
cli_cmd_show_config.go:10
↓ 1 callersMethodcliShowConfigHelp
cliShowConfigHelp displays help for the show-config command
cli_cmd_show_config.go:46
↓ 1 callersMethodcliStatus
cliStatus displays the status of all migrations
cli_cmd_status.go:11
↓ 1 callersMethodcliStatusHelp
cliStatusHelp displays help for the status command
cli_cmd_status.go:80
↓ 1 callersMethodcliUp
cliUp runs pending migrations
cli_cmd_up.go:14
↓ 1 callersMethodcliUpHelp
cliUpHelp displays help for the up command
cli_cmd_up.go:116
↓ 1 callersFunctiondefaultRunnerDownOpts
()
runner_down.go:19
↓ 1 callersFunctiondefaultRunnerUpOpts
()
runner_up.go:19
↓ 1 callersFunctiondefaultWrapOpts
()
pkg/logsql/driver.go:63
↓ 1 callersFunctiondetectPlaceholderStyle
detectPlaceholderStyle auto-detects the placeholder style based on driver name
pkg/logsql/driver.go:110
↓ 1 callersMethodfilterNonAppliedMigrations
(migrations []Migration, appliedMigrations []MigrationRecord)
runner.go:17
↓ 1 callersMethodgenerateGoTemplate
generateGoTemplate returns the Go migration template
cli_cmd_generate.go:122
↓ 1 callersMethodgenerateMigrationsList
generateMigrationsList creates the migrations.go file with all migrations
cli_cmd_generate_migrations_list.go:33
↓ 1 callersMethodgenerateSQLTemplate
generateSQLTemplate returns the SQL migration template
cli_cmd_generate.go:101
↓ 1 callersFunctiongetDriver
getDriver retrieves a registered driver by name
pkg/logsql/driver.go:155
↓ 1 callersFunctionnewCLIOutput
newCLIOutput creates a new cliOutput helper
cli_output.go:21
↓ 1 callersFunctionparseVersionToDate
(version any)
sql_migration.go:136
↓ 1 callersMethodsortNewestFirstMigrationRecord
(appliedMigrations []MigrationRecord)
runner.go:43
↓ 1 callersFunctionsplitLineByStatements
splitLineByStatements splits a line by semicolons, respecting quotes, and accumulates partial statements across lines.
sql_migration.go:271
MethodCreateSchemaMigrationsTableIfNotExists
(ctx context.Context, db *sql.DB)
driver_clickhouse.go:25
MethodCreateSchemaMigrationsTableIfNotExists
(ctx context.Context, db *sql.DB)
driver_sqlite.go:21
MethodCreateSchemaMigrationsTableIfNotExists
(ctx context.Context, db *sql.DB)
driver_pg.go:21
MethodDate
()
sql_migration.go:83
MethodDate
()
example/migrations/20251225101501_add_user_index.go:16
MethodDeleteMigrations
(ctx context.Context, db *sql.DB, dates []int64)
driver_clickhouse.go:98
MethodDeleteMigrations
(ctx context.Context, db *sql.DB, dates []int64)
driver_sqlite.go:72
MethodDeleteMigrations
(ctx context.Context, db *sql.DB, dates []int64)
driver_pg.go:72
MethodDown
(ctx context.Context, migrations []Migration, opts ...RunnerDownOptsFunc)
runner_down.go:25
MethodDown
(ctx context.Context, db *sql.DB)
sql_migration.go:37
MethodDown
(ctx context.Context, db *sql.DB)
example/migrations/20251225101501_add_user_index.go:28
MethodErr
Err returns the first error that occurred during the chain, or nil if no errors occurred
utils.go:114
MethodExec
Exec executes a SQL statement within the transaction. If a previous error occurred, this is a no-op.
utils.go:105
MethodExecContext
(ctx context.Context, args []driver.NamedValue)
pkg/logsql/driver.go:290
MethodGetAppliedMigrations
(ctx context.Context, db *sql.DB)
driver_clickhouse.go:54
MethodGetAppliedMigrations
(ctx context.Context, db *sql.DB)
driver_sqlite.go:34
MethodGetAppliedMigrations
(ctx context.Context, db *sql.DB)
driver_pg.go:34
MethodHasPendingMigrations
HasPendingMigrations checks if there are any pending migrations to apply
runner_get_migrations_statuses.go:57
MethodInsertMigrations
(ctx context.Context, db *sql.DB, list []MigrationRecord)
driver_clickhouse.go:81
MethodInsertMigrations
(ctx context.Context, db *sql.DB, list []MigrationRecord)
driver_sqlite.go:55
next →1–100 of 123, ranked by callers