postgres

package
v3.0.0-prev1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const AdvisoryLockIdSalt uint = 1486364155

Variables

View Source
var (
	ErrNoSqlInstance  = fmt.Errorf("expected *sql.DB")
	ErrNoDatabaseName = fmt.Errorf("no database name")
)

Functions

func WithInstance

func WithInstance(instance *sql.DB, config *Config) (database.Driver, error)

Types

type Config

type Config struct {
}

type Postgres

type Postgres struct {
	// contains filtered or unexported fields
}

func (*Postgres) Close

func (p *Postgres) Close() error

func (*Postgres) Drop

func (p *Postgres) Drop() error

func (*Postgres) Open

func (p *Postgres) Open(url string) (database.Driver, error)

func (*Postgres) Run

func (p *Postgres) Run(version int, migration io.Reader) error

func (*Postgres) Unlock

func (p *Postgres) Unlock() error

func (*Postgres) Version

func (p *Postgres) Version() (int, error)

Jump to

Keyboard shortcuts

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