package pgx
import "github.com/golang-migrate/migrate/v4/database/pgx/v5"
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) SetVersion(version int, dirty bool) error
- func (p *Postgres) Unlock() error
- func (p *Postgres) Version() (version int, dirty bool, err error)
Variables ¶
var ( DefaultMigrationsTable = "schema_migrations" DefaultMultiStatementMaxSize = 10 * 1 << 20 // 10 MB )
var ( ErrNilConfig = fmt.Errorf("no config") ErrNoDatabaseName = fmt.Errorf("no database name") ErrNoSchema = fmt.Errorf("no schema") )
Functions ¶
func WithInstance ¶
Types ¶
type Config ¶
type Config struct { MigrationsTable string DatabaseName string SchemaName string StatementTimeout time.Duration MigrationsTableQuoted bool MultiStatementEnabled bool MultiStatementMaxSize int // contains filtered or unexported fields }
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func (*Postgres) Close ¶
func (*Postgres) Drop ¶
func (*Postgres) Lock ¶
https://www.postgresql.org/docs/9.6/static/explicit-locking.html#ADVISORY-LOCKS
func (*Postgres) Open ¶
func (*Postgres) Run ¶
func (*Postgres) SetVersion ¶
func (*Postgres) Unlock ¶
func (*Postgres) Version ¶
Source Files ¶
- Version
- v4.18.2 (latest)
- Published
- Jan 27, 2025
- Platform
- js/wasm
- Imports
- 17 packages
- Last checked
- 1 week ago –
Tools for package owners.