Documentation ¶
Index ¶
- Variables
- func Args(src []interface{}, columns ...string) ([]interface{}, error)
- func IsEmpty(src interface{}) bool
- func IsNil(src interface{}) bool
- func NamedQuery(query string) (string, []string)
- func Row(scanner Scanner, src interface{}) error
- func Rows(scanner Scanner, src interface{}) error
- func Values(src interface{}, columns ...string) ([]interface{}, error)
- type Allocator
- type Column
- type Iterator
- type Readable
- type Scanner
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrOneRow = fmt.Errorf("sql/scan: expect exactly one row in result set")
ErrOneRow is returned by Row scan when the query returns more than one row
Functions ¶
func NamedQuery ¶
NamedQuery returns the query renamed
Types ¶
type Allocator ¶
type Allocator struct {
// contains filtered or unexported fields
}
Allocator allocates values
func NewAllocator ¶
NewAllocator returns allocator for the given reflect.Type.
func NewAllocatorPrimitive ¶
NewAllocatorPrimitive allocates primitive type
func NewAllocatorPtr ¶
NewAllocatorPtr wraps the underlying type with rowScan.
func NewAllocatorStruct ¶
NewAllocatorStruct returns the a configuration for scanning an sql.Row into a struct.
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
Iterator iterates over a struct fields
Click to show internal directories.
Click to hide internal directories.