dbal

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2018 License: Apache-2.0 Imports: 13 Imported by: 21

Documentation

Index

Constants

View Source
const (
	// DriverMySQL is the mysql driver name.
	DriverMySQL = "mysql"

	// DriverPostgreSQL is the mysql driver name.
	DriverPostgreSQL = "postgres"

	// UnknownDriver is the driver name if the driver is unknown.
	UnknownDriver = "unknown"
)

Variables

This section is empty.

Functions

func Canonicalize added in v0.0.22

func Canonicalize(database string) string

Canonicalize returns constants DriverMySQL, DriverPostgreSQL, UnknownDriver, depending on `database`.

func Connect

func Connect(db string, logger logrus.FieldLogger, memf func() error, sqlf func(db *sqlx.DB) error) error

Connect is a wrapper for connecting to different SQL drivers.

func MustCanonicalize added in v0.0.22

func MustCanonicalize(database string) string

MustCanonicalize returns constants DriverMySQL, DriverPostgreSQL or fatals.

func NewMustPackerMigrationSource added in v0.0.24

func NewMustPackerMigrationSource(l logrus.FieldLogger, folder []string) *migrate.PackrMigrationSource

NewMustPackerMigrationSource create a new packr-based migration source or fatals.

func NewPackerMigrationSource added in v0.0.24

func NewPackerMigrationSource(l logrus.FieldLogger, folder []string) (*migrate.PackrMigrationSource, error)

NewPackerMigrationSource create a new packr-based migration source or returns an error

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