db

package
v0.0.0-...-30e45d9 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMaxOpenConn = 100

DefaultMaxOpenConn will applied for db object

Variables

This section is empty.

Functions

func CopyDBResources

func CopyDBResources(input, output DB, overrideExisting bool) error

CopyDBResources copies resources from input database to output database

func InitDBWithSchemas

func InitDBWithSchemas(dbType, dbConnection string, dropOnCreate, cascade bool) error

InitDBWithSchemas initializes database using schemas stored in Manager

Types

type DB

type DB interface {
	Connect(string, string, int) error
	Close()
	Begin() (transaction.Transaction, error)
	RegisterTable(*schema.Schema, bool) error
	DropTable(*schema.Schema) error
}

DB is a common interface for handing db

func ConnectDB

func ConnectDB(dbType, conn string, maxOpenConn int) (DB, error)

ConnectDB is builder function of DB

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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