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() 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) 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 ( ErrNilConfig = fmt.Errorf("no config") ErrNoDatabaseName = fmt.Errorf("no database name") ErrNoSchema = fmt.Errorf("no schema") ErrDatabaseDirty = fmt.Errorf("database is dirty") )
View Source
var DefaultMigrationsTable = "schema_migrations"
Functions ¶
Types ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.