db

package
v0.0.0-...-a9fc698 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*sql.DB
}

DB is a pool of zero or more underlying connections to the drone database.

func Connect

func Connect(driver, datasource string) (*DB, error)

func (*DB) WithTx

func (d *DB) WithTx(fn func(tx *sql.Tx) error) error

type Execer

type Execer interface {
	Exec(query string, args ...interface{}) (sql.Result, error)
}

type Mapper

type Mapper func(scanner Scanner, model interface{}) error

type Scanner

type Scanner interface {
	Scan(dest ...interface{}) error
}

A Scanner represents an object that can be scanned for values.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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