sqlxengine

package
v0.0.0-...-267bd09 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2016 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseEngine

type DatabaseEngine interface {
	Name() string
	Factory() types.Factory
	Connection() *sqlx.DB
}

DatabaseEngine is an interface to a Database engine implementation at the moment we only implemented PostgreSQL because SQLite does not support ALTER TABLE ADD CONSTRAINT and thus penguon does not support generating FKConstraints on SQLite

func NewPostgreSQLEngine

func NewPostgreSQLEngine(url string) (DatabaseEngine, error)

NewPostgreSQLEngine is a helper method to construct a new PostgreSQL engine from a given URL if can return an error that you must handle before trying to use the returned engine if you want to avoid runtime panics

Jump to

Keyboard shortcuts

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