db

package
v0.3.0-prep Latest Latest
Warning

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

Go to latest
Published: May 4, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DriverForScheme

func DriverForScheme(scheme string) string

Most SQL drivers expect the driver name to appear as the scheme in the database source URL; for instance, `postgres://host:2345`. However, cznic/ql uses the schemes "file" and "memory" (or just a bare path), and names its drivers `ql` and `ql-mem`. So we can deal just with URLs, translate these where needed.

func Migrate

func Migrate(dburl, basedir string) (uint64, error)

Make sure the database at the URL is up to date with respect to migrations, or return an error. The migration scripts are taken from `basedir/{scheme}`, with the scheme coming from the URL.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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