Documentation
¶
Index ¶
- Variables
- func NewPostgresPool(url string) (*postgresConnection, error)
- func NewSqlite3Connection(path string) (*sqlite3Connection, error)
- func RunPostgresMigrations(ctx context.Context, c *postgresConnection) error
- func RunSqlite3Migrations(ctx context.Context, conn Connection, path string) error
- type CommandTag
- type Connection
- type Result
- type Row
- type Rows
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoRows = errors.New("no rows in result set") ErrEmptyFile = errors.New("empty migration file") )
Functions ¶
func NewPostgresPool ¶
func NewSqlite3Connection ¶
func RunPostgresMigrations ¶
func RunSqlite3Migrations ¶
func RunSqlite3Migrations(ctx context.Context, conn Connection, path string) error
Types ¶
type CommandTag ¶
type CommandTag interface {
String() string
}
type Connection ¶
type Connection interface {
Exec(ctx context.Context, query string, args ...interface{}) (Result, error)
Query(ctx context.Context, query string, args ...interface{}) (Rows, error)
QueryRow(ctx context.Context, query string, args ...interface{}) Row
Begin(ctx context.Context) (Connection, error)
Close()
}
Click to show internal directories.
Click to hide internal directories.