postgres

package
v0.0.2-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresRepository

type PostgresRepository struct {
	database.Repository
	// contains filtered or unexported fields
}

func NewPostgresRepository

func NewPostgresRepository(ctx context.Context, db database.Database) *PostgresRepository

func (*PostgresRepository) AssertSchemaHistoryTable

func (r *PostgresRepository) AssertSchemaHistoryTable() error

func (*PostgresRepository) CheckSchemaHistoryTable

func (r *PostgresRepository) CheckSchemaHistoryTable() (bool, error)

func (*PostgresRepository) DoInLock

func (r *PostgresRepository) DoInLock(fn func() error) error

func (*PostgresRepository) DoInTransaction

func (r *PostgresRepository) DoInTransaction(fn func() error) error

func (*PostgresRepository) ExecuteHook

func (r *PostgresRepository) ExecuteHook(hook *migrations.Hook) error

func (*PostgresRepository) ExecuteMigration

func (r *PostgresRepository) ExecuteMigration(migration *migrations.Migration) []error

func (*PostgresRepository) GetFailingMigrations

func (r *PostgresRepository) GetFailingMigrations() ([]*migrations.Migration, error)

func (*PostgresRepository) GetLatestMigration

func (r *PostgresRepository) GetLatestMigration() (uint16, error)

func (*PostgresRepository) Repair

func (r *PostgresRepository) Repair(migrations []*migrations.Migration) []error

func (*PostgresRepository) RollbackMigration

func (r *PostgresRepository) RollbackMigration(migration *migrations.Migration) []error

func (*PostgresRepository) ValidateMigrations

func (r *PostgresRepository) ValidateMigrations(migrations []*migrations.Migration) []error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL