support

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2018 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(tbl sqlgen2.Table, req require.Requirement, query string, args ...interface{}) (int64, error)

Exec executes a modification query (insert, update, delete, etc) and returns the number of items affected.

The query is logged using whatever logger is configured. If an error arises, this too is logged.

func Query added in v0.16.0

func Query(tbl sqlgen2.Table, query string, args ...interface{}) (*sql.Rows, error)

Query is the low-level request method for this table.

The query is logged using whatever logger is configured. If an error arises, this too is logged.

The args are for any placeholder parameters in the query.

The caller must call rows.Close() on the result.

func QueryOneNullThing

func QueryOneNullThing(tbl sqlgen2.Table, req require.Requirement, holder interface{}, query string, args ...interface{}) error

QueryOneNullThing queries for one cell of one record. Normally, the holder will be sql.NullString or similar.

func ReplaceTableName

func ReplaceTableName(tbl sqlgen2.Table, query string) string

ReplaceTableName replaces all occurrences of "{TABLE}" with the table's name.

func SliceFloat32List added in v0.29.0

func SliceFloat32List(tbl sqlgen2.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]float32, error)

SliceFloat32List requests a columnar slice of float32s from a specified column.

func SliceFloat64List added in v0.29.0

func SliceFloat64List(tbl sqlgen2.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]float64, error)

SliceFloat64List requests a columnar slice of float64s from a specified column.

func SliceInt16List added in v0.29.0

func SliceInt16List(tbl sqlgen2.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]int16, error)

SliceInt16List requests a columnar slice of int16s from a specified column.

func SliceInt32List added in v0.29.0

func SliceInt32List(tbl sqlgen2.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]int32, error)

SliceInt32List requests a columnar slice of int32s from a specified column.

func SliceInt64List added in v0.29.0

func SliceInt64List(tbl sqlgen2.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]int64, error)

SliceInt64List requests a columnar slice of int64s from a specified column.

func SliceInt8List added in v0.29.0

func SliceInt8List(tbl sqlgen2.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]int8, error)

SliceInt8List requests a columnar slice of int8s from a specified column.

func SliceIntList added in v0.29.0

func SliceIntList(tbl sqlgen2.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]int, error)

SliceIntList requests a columnar slice of ints from a specified column.

func SliceStringList added in v0.29.0

func SliceStringList(tbl sqlgen2.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]string, error)

SliceStringList requests a columnar slice of strings from a specified column.

func SliceUint16List added in v0.29.0

func SliceUint16List(tbl sqlgen2.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]uint16, error)

SliceUint16List requests a columnar slice of uint16s from a specified column.

func SliceUint32List added in v0.29.0

func SliceUint32List(tbl sqlgen2.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]uint32, error)

SliceUint32List requests a columnar slice of uint32s from a specified column.

func SliceUint64List added in v0.29.0

func SliceUint64List(tbl sqlgen2.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]uint64, error)

SliceUint64List requests a columnar slice of uint64s from a specified column.

func SliceUint8List added in v0.29.0

func SliceUint8List(tbl sqlgen2.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]uint8, error)

SliceUint8List requests a columnar slice of uint8 from a specified column.

func SliceUintList added in v0.29.0

func SliceUintList(tbl sqlgen2.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]uint, error)

SliceUintList requests a columnar slice of uints from a specified column.

func UpdateFields

func UpdateFields(tbl sqlgen2.Table, req require.Requirement, wh where.Expression, fields ...sql.NamedArg) (int64, error)

UpdateFields writes certain fields of all the records matching a 'where' expression.

Types

This section is empty.

Jump to

Keyboard shortcuts

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