driverutil

package
v0.0.0-...-e44b46f Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2019 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ENoDatabase = errors.New("ENoDatabase")

Functions

This section is empty.

Types

type Database

type Database struct {
	Sch schema.Schema
}

func (*Database) Begin

func (db *Database) Begin() (driver.Tx, error)

func (*Database) CheckNamedValue

func (db *Database) CheckNamedValue(nv *driver.NamedValue) error

func (*Database) Close

func (db *Database) Close() error

func (*Database) Prepare

func (db *Database) Prepare(query string) (driver.Stmt, error)

type DatabaseContext

type DatabaseContext struct {
	Parent driver.Driver
	Itself *Database
}

func (*DatabaseContext) Connect

func (d *DatabaseContext) Connect(ctx context.Context) (driver.Conn, error)

func (*DatabaseContext) Driver

func (d *DatabaseContext) Driver() driver.Driver

type DbRegistry

type DbRegistry struct {
	Rwm sync.RWMutex
	Map map[string]*Database
}

func (*DbRegistry) Open

func (db *DbRegistry) Open(name string) (driver.Conn, error)

func (*DbRegistry) OpenConnector

func (db *DbRegistry) OpenConnector(name string) (driver.Connector, error)

func (*DbRegistry) RegisterDb

func (db *DbRegistry) RegisterDb(name string, base *Database)

Jump to

Keyboard shortcuts

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