sql

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Driver  string `json:"driver"`
	Connect string `json:"connect"`
}

type DB

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

func New

func New(conf *Config) *DB

func (*DB) Close

func (db *DB) Close()

func (*DB) Commit

func (db *DB) Commit()

func (*DB) Exec

func (db *DB) Exec(query string, args ...interface{})

func (*DB) Rollback

func (db *DB) Rollback()

func (*DB) Select

func (db *DB) Select(query string, args []interface{}, fn ROW_CALLBACK)

func (*DB) SelectFloat

func (db *DB) SelectFloat(query string, args ...interface{}) (float64, bool)

func (*DB) SelectInt

func (db *DB) SelectInt(query string, args ...interface{}) (int64, bool)

func (*DB) SelectRow

func (db *DB) SelectRow(query string, args []interface{}, res ...interface{}) bool

func (*DB) SelectString

func (db *DB) SelectString(query string, args ...interface{}) (string, bool)

type ROW_CALLBACK

type ROW_CALLBACK func(r Row) error

type Row

type Row = *sql.Rows

Jump to

Keyboard shortcuts

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