database

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 12, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInitialized      = errors.New("database already initialized")
	ErrAlreadyPerformed = errors.New("already performed revision")
	ErrCheckHashFailed  = errors.New("revision hash check failed")
)

Functions

This section is empty.

Types

type DB

type DB struct {
	*sql.DB

	Type Type
}

func Open

func Open(cfg *config.Config) (*DB, error)

func (*DB) Init

func (db *DB) Init() error

func (*DB) Log

func (db *DB) Log(r *revision.Revision, forced bool) error

func (*DB) Perform

func (db *DB) Perform(r *revision.Revision, force bool) error

func (*DB) ReadLog

func (db *DB) ReadLog(ids ...string) ([]*revision.Revision, error)

func (*DB) ReadLogReverse

func (db *DB) ReadLogReverse(ids ...string) ([]*revision.Revision, error)

type Type

type Type uint32
const (
	SQLite3 Type = iota
	Postgres
	MySQL
)

Jump to

Keyboard shortcuts

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