Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrNilPointer = utils.Error("ptr to struct to be parsed by field spec is nil") ErrInvalidStruct = utils.Error("field spec requires a pointer to a struct; invalid type") )
Variables ¶
This section is empty.
Functions ¶
func GetReservedTypes ¶
func GetReservedTypes() []string
GetReservedTypes get a copy of the list of reserved types
func IsReservedType ¶
**
- Check if a given type string is reserved
- Reserved means the value is passed "as is"
- This is a workaround to allow to pass struct-based types that are recognized by the driver
Types ¶
type Metadata ¶
type Metadata struct {
Name string `json:"fieldName"` // actual field name
DbName string `json:"dbName"` // database field name
Alias string `json:"fieldAlias"` // serialized name (json,xml, etc)
Sortable bool `json:"sortable"` // true if field is sortable
Filterable bool `json:"filterable"` // true if field is filterable
Searchable bool `json:"searchable"` // true if field is searchable
Auto bool `json:"auto"` // true if field is automatically generated
OmitNil bool `json:"omitNil"` // true if field is skipped on insert if nil
OmitEmpty bool `json:"omitEmpty"` // true if field is skipped on insert if empty
TypeName string `json:"typeName"` // field type name (from reflect.Type.Name())
Type reflect.Type
DbOptions []string `json:"dbOptions"` // additional db options like goqu, etc
}
Click to show internal directories.
Click to hide internal directories.