dbutil

package
v0.0.0-...-740a42e Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2014 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BulkInsert

func BulkInsert(db *sqlx.DB, tableName string, columns []string, rows [][]interface{}) (err error)

Does a bulk insert of data into a single table using a transaction to make it quick:

func GetScalar

func GetScalar(db *sqlx.DB, query string, args ...interface{}) (value interface{}, err error)

Gets a single scalar value from a DB query:

func GetScalars

func GetScalars(db *sqlx.DB, query string, args ...interface{}) (slice []interface{}, err error)

Gets a slice of scalar values from a DB query:

func Tx

func Tx(db *sqlx.DB, action func(tx *sqlx.Tx) error) (err error)

Execute a database action in a transaction:

Types

This section is empty.

Jump to

Keyboard shortcuts

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