postgres

package
v3.0.0-prev0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2017 License: MIT Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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