database

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSupportDatabaseType

func CheckSupportDatabaseType(dbType string) bool

CheckSupportDatabaseType checks support database driver.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

DB is a database handle representing a pool of zero or more underlying connections.

func NewDB

func NewDB(cfg *config.Database) (*DB, error)

NewDB initializes connection to database.

func (*DB) Close

func (db *DB) Close() error

Close closes connection.

func (*DB) Exec

func (db *DB) Exec(query string) error

Exec executes a query.

Jump to

Keyboard shortcuts

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