dbpgx

package
v0.0.0-...-989d483 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2021 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateDbUrl = "postgresqql://localhost/postgres"
View Source
var ScratchDatabaseUrl = "postgresql://localhost/scratch_db"

Functions

func NewMigrator

func NewMigrator(db *pgx.Conn) schemadance.Migrator

func TestMigrations

func TestMigrations(t *testing.T)

Types

type Checker

type Checker struct {
	// contains filtered or unexported fields
}

func (Checker) Fingerprint

func (c Checker) Fingerprint() (string, error)

func (Checker) Version

func (c Checker) Version(prefix string) (int, error)

type Db

type Db struct {
	*pgx.Conn
}

func (Db) Begin

func (d Db) Begin(ctx context.Context) (schemadance.Tx, error)

func (Db) Close

func (d Db) Close(ctx context.Context) error

func (Db) Initialize

func (d Db) Initialize(ctx context.Context) error

type Tx

type Tx struct {
	pgx.Tx
}

func (Tx) Commit

func (t Tx) Commit(ctx context.Context) error

func (Tx) Exec

func (t Tx) Exec(ctx context.Context, sql string) error

func (Tx) Rollback

func (t Tx) Rollback(ctx context.Context) error

func (Tx) SetVersion

func (t Tx) SetVersion(ctx context.Context, prefix string, version int) error

func (Tx) Version

func (t Tx) Version(ctx context.Context, prefix string) (int, error)

Jump to

Keyboard shortcuts

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