Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct { Column string // Whether this field is read-only, meaning it should not be used for inserts/updatesbe scanned into. ReadOnly bool // Full field index to this field from our root struct Index []int // Direct type of field, equal to Type unless pointer DirectType reflect.Type // Type of field, may be a pointer. Type reflect.Type // contains filtered or unexported fields }
Field represents a Field in a struct. Adapted from json package reflection. Key difference is json recursively encodes/decodes, we're handling flat tabular data.
func (*Field) IsEmbeddedStruct ¶
type Fields ¶
Fields represents the fields of a struct.
func FieldsFactory ¶
Internally, all types are stored in a cache to avoid repeated work.
func (*Fields) IsEmbeddedStruct ¶
type FieldsRows ¶
FieldsRows handles scanning rows into given struct field.
func NewFieldsRows ¶
func NewFieldsRows(f *Fields, rows *sql.Rows) (*FieldsRows, error)
Click to show internal directories.
Click to hide internal directories.