Documentation
¶
Index ¶
- Constants
- type Store
- func (store *Store) CreateVersionTable(ctx context.Context, db database.DBTxConn) error
- func (store *Store) Delete(ctx context.Context, db database.DBTxConn, version int64) error
- func (store *Store) GetLatestVersion(ctx context.Context, db database.DBTxConn) (int64, error)
- func (store *Store) GetMigration(ctx context.Context, db database.DBTxConn, version int64) (*database.GetMigrationResult, error)
- func (store *Store) Insert(ctx context.Context, db database.DBTxConn, req database.InsertRequest) error
- func (store *Store) ListMigrations(ctx context.Context, db database.DBTxConn) ([]*database.ListMigrationsResult, error)
- func (store *Store) TableExists(ctx context.Context, db database.DBTxConn) (bool, error)
- func (store *Store) Tablename() string
Constants ¶
View Source
const Dialect = goose.DialectCustom
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// Logger may be used for by each exported method.
// Logs are level slog.LevelDebug.
// When it is not set, logging is skipped.
Logger *slog.Logger
// contains filtered or unexported fields
}
Store is an alternate Goose Store implementation that scans tstamp as an INTEGER time.Unix value instead of a time.Time.
func NewStoreWithName ¶
func (*Store) CreateVersionTable ¶
CreateVersionTable differs from GOOS in that it uses an INTEGER for tstamp.
func (*Store) GetLatestVersion ¶
func (*Store) GetMigration ¶
func (store *Store) GetMigration(ctx context.Context, db database.DBTxConn, version int64) (*database.GetMigrationResult, error)
GetMigration differs from GOOS in that it scans an int64 (instead of time.Time) for tstamp and converts it into a time.Time.
func (*Store) ListMigrations ¶
func (*Store) TableExists ¶
Click to show internal directories.
Click to hide internal directories.