dbx

package
v0.0.0-...-970f38b Latest Latest
Warning

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

Go to latest
Published: May 24, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	DSN     string
	Dir     string
	Dialect string
}

Configuration for connection to DB

type DB

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

DB is the struct for a DB connection

func New

func New(conf Configuration, timeout *time.Duration) (*DB, error)

New creates a new DB connection

func (*DB) Close

func (db *DB) Close() error

Close connection

func (*DB) DB

func (db *DB) DB() *sqlx.DB

DB returns a db object

type DBx

type DBx interface {
	DB() *sqlx.DB
}

DBx is the interface for a DB connection

Jump to

Keyboard shortcuts

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