driver

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(name string) gomodel.Driver

func NewMySQL added in v0.6.2

func NewMySQL(name string) gomodel.Driver

func NewPostgres added in v0.6.2

func NewPostgres(name string) gomodel.Driver

func NewSQLite3 added in v0.6.3

func NewSQLite3(name string) gomodel.Driver

func Register

func Register(name string, driver gomodel.Driver) bool

func Replace added in v0.6.2

func Replace(name string, driver gomodel.Driver)

Types

type MySQL

type MySQL string

func (MySQL) DSN

func (MySQL) DSN(host, port, username, password, dbname string, cfg map[string]string) string

func (MySQL) DuplicateKey

func (MySQL) DuplicateKey(err error) string

func (MySQL) ForeignKey

func (MySQL) ForeignKey(err error) string

func (MySQL) ParamLimit

func (MySQL) ParamLimit(offset, count int) (int, int)

func (MySQL) Prepare

func (MySQL) Prepare(sql string) string

func (MySQL) PrimaryKey

func (MySQL) PrimaryKey() string

func (MySQL) SQLLimit

func (MySQL) SQLLimit() string

func (MySQL) String

func (m MySQL) String() string

type PGError added in v0.6.3

type PGError interface {
	Get(k byte) (v string)
}

type Postgres

type Postgres string

func (Postgres) DSN

func (Postgres) DSN(host, port, username, password, dbname string, cfg map[string]string) string

func (Postgres) DuplicateKey

func (p Postgres) DuplicateKey(err error) string

func (Postgres) ForeignKey

func (p Postgres) ForeignKey(err error) string

func (Postgres) ParamLimit

func (Postgres) ParamLimit(offset, count int) (int, int)

func (Postgres) Prepare

func (p Postgres) Prepare(sql string) string

func (Postgres) PrimaryKey

func (Postgres) PrimaryKey() string

func (Postgres) SQLLimit

func (Postgres) SQLLimit() string

func (Postgres) String

func (p Postgres) String() string

type SQLite3 added in v0.6.3

type SQLite3 string

func (SQLite3) DSN added in v0.6.3

func (SQLite3) DSN(_, _, _, _, path string, cfg map[string]string) string

func (SQLite3) DuplicateKey added in v0.6.3

func (SQLite3) DuplicateKey(err error) string

func (SQLite3) ForeignKey added in v0.6.3

func (SQLite3) ForeignKey(err error) string

func (SQLite3) ParamLimit added in v0.6.3

func (SQLite3) ParamLimit(offset, count int) (int, int)

func (SQLite3) Prepare added in v0.6.3

func (SQLite3) Prepare(sql string) string

func (SQLite3) PrimaryKey added in v0.6.3

func (SQLite3) PrimaryKey() string

func (SQLite3) SQLLimit added in v0.6.3

func (SQLite3) SQLLimit() string

func (SQLite3) String added in v0.6.3

func (m SQLite3) String() string

Jump to

Keyboard shortcuts

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