Documentation ¶
Index ¶
- Variables
- func WithInstance(instance *sql.DB, config *Config) (database.Driver, error)
- type Config
- type Postgres
- func (p *Postgres) Close() error
- func (p *Postgres) Drop() (err error)
- func (p *Postgres) Lock() error
- func (p *Postgres) Open(url string) (database.Driver, error)
- func (p *Postgres) Run(migration io.Reader) error
- func (p *Postgres) RunFunctionMigration(fn source.MigrationFunc) error
- func (p *Postgres) SetVersion(version int, dirty bool) error
- func (p *Postgres) Unlock() error
- func (p *Postgres) Version() (version int, dirty bool, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultMigrationsTable = "schema_migrations" DefaultMultiStatementMaxSize = 10 * 1 << 20 // 10 MB )
Functions ¶
Types ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func (*Postgres) Lock ¶
https://www.postgresql.org/docs/9.6/static/explicit-locking.html#ADVISORY-LOCKS
func (*Postgres) RunFunctionMigration ¶
func (p *Postgres) RunFunctionMigration(fn source.MigrationFunc) error
Click to show internal directories.
Click to hide internal directories.