dbsqlc

package
v0.0.0-...-52bc52d Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplyMigrationParams

type ApplyMigrationParams struct {
	ID        uuid.UUID
	Version   int64
	Name      string
	Namespace string
}

type Conduitmigration

type Conduitmigration struct {
	ID        uuid.UUID
	CreatedAt pgtype.Timestamp
	Version   int64
	Name      string
	Namespace string
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type Queries

type Queries struct {
}

func New

func New() *Queries

func (*Queries) AcquireLock

func (q *Queries) AcquireLock(ctx context.Context, db DBTX, lockNum int64) error

func (*Queries) AllExistingMigrationVersions

func (q *Queries) AllExistingMigrationVersions(ctx context.Context, db DBTX, namespace string) ([]int64, error)

func (*Queries) ApplyMigration

func (q *Queries) ApplyMigration(ctx context.Context, db DBTX, arg ApplyMigrationParams) error

func (*Queries) DoesTableExist

func (q *Queries) DoesTableExist(ctx context.Context, db DBTX, tableName string) (bool, error)

func (*Queries) ReleaseLock

func (q *Queries) ReleaseLock(ctx context.Context, db DBTX, lockNum int64) error

func (*Queries) ResetConn

func (q *Queries) ResetConn(ctx context.Context, db DBTX) error

func (*Queries) RollbackMigration

func (q *Queries) RollbackMigration(ctx context.Context, db DBTX, arg RollbackMigrationParams) error

type RollbackMigrationParams

type RollbackMigrationParams struct {
	Version   int64
	Namespace string
}

Jump to

Keyboard shortcuts

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