MCPcopy
hub / github.com/rubenv/sql-migrate / ExecMax

Method ExecMax

migrate.go:507–509  ·  view source on GitHub ↗

Returns the number of applied migrations.

(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, max int)

Source from the content-addressed store, hash-verified

505
506// Returns the number of applied migrations.
507func (ms MigrationSet) ExecMax(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, max int) (int, error) {
508 return ms.ExecMaxContext(context.Background(), db, dialect, m, dir, max)
509}
510
511// Returns the number of applied migrations, but applies with an input context.
512func (ms MigrationSet) ExecMaxContext(ctx context.Context, db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, max int) (int, error) {

Callers 3

ExecMaxFunction · 0.80
RunMethod · 0.80
ApplyMigrationsFunction · 0.80

Calls 1

ExecMaxContextMethod · 0.95

Tested by

no test coverage detected