Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MigrationNoTx ¶
MigrationNoTx represents a single not transactional migration
func (*MigrationNoTx) String ¶
func (m *MigrationNoTx) String() string
type Migrator ¶
type Migrator struct { TableName string // contains filtered or unexported fields }
Migrator is the migrator implementation
func (*Migrator) NeedUpgrade ¶
NeedUpgrade returns True if database need to be updated with migrations
type Option ¶
type Option func(*Migrator)
Option sets options such migrations or table name.
func Migrations ¶
func Migrations(migrations ...interface{}) Option
Migrations creates an option with provided migrations
type PgxIface ¶
type PgxIface interface { Begin(ctx context.Context) (pgx.Tx, error) Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) QueryRow(context.Context, string, ...interface{}) pgx.Row Query(ctx context.Context, query string, args ...interface{}) (pgx.Rows, error) }
PgxIface is interface for database connection or transaction
Click to show internal directories.
Click to hide internal directories.