Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnsupportedDataType = errors.New("unsupported data type")
ErrUnsupportedDataType unsupported data type
View Source
var TimeReflectType = reflect.TypeOf(time.Time{})
Functions ¶
Types ¶
type Field ¶
type Field struct { Name string DBName string BindNames []string DataType DataType Precision int FieldType reflect.Type IndirectFieldType reflect.Type StructField reflect.StructField TagSettings map[string]string ReflectValueOf func(reflect.Value) reflect.Value ValueOf func(reflect.Value) (value interface{}, zero bool) Set func(reflect.Value, interface{}) error }
type NamingStrategy ¶
func (NamingStrategy) ColumnName ¶
func (ns NamingStrategy) ColumnName(table, column string) string
func (NamingStrategy) IndexName ¶
func (ns NamingStrategy) IndexName(table, column string) string
func (NamingStrategy) SchemaName ¶
func (ns NamingStrategy) SchemaName(table string) string
func (NamingStrategy) TableName ¶
func (ns NamingStrategy) TableName(str string) string
type Schema ¶
type Schema struct { Name string Table string ModelType reflect.Type FieldsByName map[string]*Field FieldsByDBName map[string]*Field Fields []*Field DBNames []string // contains filtered or unexported fields }
func (Schema) LookUpField ¶
func (*Schema) ParseField ¶
func (schema *Schema) ParseField(fieldStruct reflect.StructField) *Field
Click to show internal directories.
Click to hide internal directories.