postgres

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package postgres provides a PostgreSQL driver for Queen migrations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	base.Driver
	// contains filtered or unexported fields
}

Driver implements the queen.Driver interface for PostgreSQL.

func New

func New(db *sql.DB) *Driver

New creates a new PostgreSQL driver.

func NewWithTableName

func NewWithTableName(db *sql.DB, tableName string) *Driver

NewWithTableName creates a new PostgreSQL driver with a custom table name.

func (*Driver) Init

func (d *Driver) Init(ctx context.Context) error

Init creates the migrations tracking table if it doesn't exist.

func (*Driver) Lock

func (d *Driver) Lock(ctx context.Context, timeout time.Duration) error

Lock acquires an advisory lock to prevent concurrent migrations.

func (*Driver) Unlock

func (d *Driver) Unlock(ctx context.Context) error

Unlock releases the advisory lock.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL