Documentation ¶
Index ¶
- func Exec(tbl pgxapi.Table, req require.Requirement, query string, args ...interface{}) (int64, error)
- func GetIntIntIndex(tbl pgxapi.Table, q quote.Quoter, keyColumn, valColumn string, ...) (map[int64]int64, error)
- func GetIntStringIndex(tbl pgxapi.Table, q quote.Quoter, keyColumn, valColumn string, ...) (map[int64]string, error)
- func GetStringIntIndex(tbl pgxapi.Table, q quote.Quoter, keyColumn, valColumn string, ...) (map[string]int64, error)
- func Query(tbl pgxapi.Table, query string, args ...interface{}) (pgxapi.SqlRows, error)
- func QueryOneNullThing(tbl pgxapi.Table, req require.Requirement, holder interface{}, query string, ...) error
- func ReplaceTableName(tbl pgxapi.Table, query string) string
- func SliceFloat32List(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]float32, error)
- func SliceFloat32PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]float32, error)
- func SliceFloat64List(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]float64, error)
- func SliceFloat64PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]float64, error)
- func SliceInt16List(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]int16, error)
- func SliceInt16PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]int16, error)
- func SliceInt32List(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]int32, error)
- func SliceInt32PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]int32, error)
- func SliceInt64List(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]int64, error)
- func SliceInt64PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]int64, error)
- func SliceInt8List(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]int8, error)
- func SliceInt8PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]int8, error)
- func SliceIntList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]int, error)
- func SliceIntPtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]int, error)
- func SliceStringList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]string, error)
- func SliceStringPtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]string, error)
- func SliceUint16List(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]uint16, error)
- func SliceUint16PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]uint16, error)
- func SliceUint32List(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]uint32, error)
- func SliceUint32PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]uint32, error)
- func SliceUint64List(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]uint64, error)
- func SliceUint64PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]uint64, error)
- func SliceUint8List(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]uint8, error)
- func SliceUint8PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]uint8, error)
- func SliceUintList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]uint, error)
- func SliceUintPtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, ...) ([]uint, error)
- func UpdateFields(tbl pgxapi.Table, req require.Requirement, wh where.Expression, ...) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Exec ¶
func Exec(tbl pgxapi.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 GetIntIntIndex ¶ added in v0.31.0
func GetIntIntIndex(tbl pgxapi.Table, q quote.Quoter, keyColumn, valColumn string, wh where.Expression) (map[int64]int64, error)
GetIntIntIndex reads two integer columns from a specified database table and returns an index built from them.
func GetIntStringIndex ¶ added in v0.31.0
func GetIntStringIndex(tbl pgxapi.Table, q quote.Quoter, keyColumn, valColumn string, wh where.Expression) (map[int64]string, error)
GetIntStringIndex reads an integer column and a string column from a specified database table and returns an index built from them.
func GetStringIntIndex ¶ added in v0.31.0
func GetStringIntIndex(tbl pgxapi.Table, q quote.Quoter, keyColumn, valColumn string, wh where.Expression) (map[string]int64, error)
GetStringIntIndex reads a string column and an integer column from a specified database table and returns an index built from them.
func Query ¶
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 pgxapi.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. If required, the query can use "{TABLE}" in place of the table name.
func ReplaceTableName ¶
ReplaceTableName replaces all occurrences of "{TABLE}" with the table's name.
func SliceFloat32List ¶
func SliceFloat32List(tbl pgxapi.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 SliceFloat32PtrList ¶
func SliceFloat32PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]float32, error)
SliceFloat32PtrList requests a columnar slice of float32s from a specified nullable column.
func SliceFloat64List ¶
func SliceFloat64List(tbl pgxapi.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 SliceFloat64PtrList ¶
func SliceFloat64PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]float64, error)
SliceFloat64PtrList requests a columnar slice of float64s from a specified nullable column.
func SliceInt16List ¶
func SliceInt16List(tbl pgxapi.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 SliceInt16PtrList ¶
func SliceInt16PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]int16, error)
SliceInt16PtrList requests a columnar slice of int16s from a specified nullable column.
func SliceInt32List ¶
func SliceInt32List(tbl pgxapi.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 SliceInt32PtrList ¶
func SliceInt32PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]int32, error)
SliceInt32PtrList requests a columnar slice of int32s from a specified nullable column.
func SliceInt64List ¶
func SliceInt64List(tbl pgxapi.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 SliceInt64PtrList ¶
func SliceInt64PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]int64, error)
SliceInt64PtrList requests a columnar slice of int64s from a specified nullable column.
func SliceInt8List ¶
func SliceInt8List(tbl pgxapi.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 SliceInt8PtrList ¶
func SliceInt8PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]int8, error)
SliceInt8PtrList requests a columnar slice of int8s from a specified nullable column.
func SliceIntList ¶
func SliceIntList(tbl pgxapi.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 SliceIntPtrList ¶
func SliceIntPtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]int, error)
SliceIntPtrList requests a columnar slice of ints from a specified nullable column.
func SliceStringList ¶
func SliceStringList(tbl pgxapi.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 SliceStringPtrList ¶
func SliceStringPtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]string, error)
SliceStringPtrList requests a columnar slice of strings from a specified nullable column.
func SliceUint16List ¶
func SliceUint16List(tbl pgxapi.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 SliceUint16PtrList ¶
func SliceUint16PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]uint16, error)
SliceUint16PtrList requests a columnar slice of uint16s from a specified nullable column.
func SliceUint32List ¶
func SliceUint32List(tbl pgxapi.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 SliceUint32PtrList ¶
func SliceUint32PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]uint32, error)
SliceUint32PtrList requests a columnar slice of uint32s from a specified nullable column.
func SliceUint64List ¶
func SliceUint64List(tbl pgxapi.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 SliceUint64PtrList ¶
func SliceUint64PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]uint64, error)
SliceUint64PtrList requests a columnar slice of uint64s from a specified nullable column.
func SliceUint8List ¶
func SliceUint8List(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]uint8, error)
SliceUint8List requests a columnar slice of uint8s from a specified column.
func SliceUint8PtrList ¶
func SliceUint8PtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]uint8, error)
SliceUint8PtrList requests a columnar slice of uint8s from a specified nullable column.
func SliceUintList ¶
func SliceUintList(tbl pgxapi.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 SliceUintPtrList ¶
func SliceUintPtrList(tbl pgxapi.Table, req require.Requirement, sqlname string, wh where.Expression, qc where.QueryConstraint) ([]uint, error)
SliceUintPtrList requests a columnar slice of uints from a specified nullable column.
func UpdateFields ¶
func UpdateFields(tbl pgxapi.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.