Documentation
¶
Index ¶
- type DB
- func (db *DB) Close() error
- func (db *DB) CreateMetaCheckpointsIfNotExists(ctx context.Context) error
- func (db *DB) CreateMetaIfNotExists(ctx context.Context) error
- func (db *DB) DeleteMetaCheckpoints(ctx context.Context) error
- func (db *DB) ForeignKeyViolations(ctx context.Context, limit int) (_ []migrate.ForeignKeyViolation, err error)
- func (db *DB) GetMetaCheckpoints(ctx context.Context, filename string) (_ []string, err error)
- func (db *DB) GetMigrations(ctx context.Context) (_ []migrate.Migration, err error)
- func (db *DB) InsertMetaCheckpoint(ctx context.Context, filename, content, checksum string, idx int) error
- func (db *DB) InsertMigration(ctx context.Context, filename, content, checksum string) error
- func (db *DB) Open() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
DB is a migrate.Store for the SQLite database at a path.
func New ¶
New returns a DB for the database at dbFile, a path or a "file:" URI. Call Open before passing it to migrate.New.
func (*DB) CreateMetaCheckpointsIfNotExists ¶
func (*DB) ForeignKeyViolations ¶
func (db *DB) ForeignKeyViolations( ctx context.Context, limit int, ) (_ []migrate.ForeignKeyViolation, err error)
ForeignKeyViolations reads PRAGMA foreign_key_check, which reports every dangling reference whether or not foreign keys are enforced, stopping after limit rows.
func (*DB) GetMetaCheckpoints ¶
func (*DB) GetMigrations ¶
func (*DB) InsertMetaCheckpoint ¶
func (*DB) InsertMigration ¶
Source Files
¶
- sqlite.go
Click to show internal directories.
Click to hide internal directories.