postgres

package
v0.0.0-...-20e2382 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2015 License: MIT, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *runner.DB

global database (pooling provided by SQL driver)

Functions

func Init

func Init(confFunc func(conf *Config))

func Migrate

func Migrate(migrations string) error

Types

type Config

type Config struct {
	ConnectString       string
	Cache               KeyStore
	MaxIdleCons         int
	MaxOpenCons         int
	EnableQueryInterp   bool
	ProdMode            bool
	LogQueriesThreshold time.Duration
}

ConnectString should look something like "dbname=dat_test user=dat password=!test host=localhost sslmode=disable"

type KeyStore

type KeyStore interface {
	GetStore() kvs.KeyValueStore
}

If GetStore is nil, no caching is done

Jump to

Keyboard shortcuts

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