Documentation
¶
Index ¶
- Variables
- type Int
- type Model
- func (m *Model) GetFieldValue(field *mapping.StructField) (interface{}, error)
- func (m *Model) GetFieldZeroValue(field *mapping.StructField) (interface{}, error)
- func (m *Model) GetFieldsAddress(field *mapping.StructField) (interface{}, error)
- func (m *Model) GetHashableFieldValue(field *mapping.StructField) (interface{}, error)
- func (m *Model) GetPrimaryKeyAddress() interface{}
- func (m *Model) GetPrimaryKeyHashableValue() interface{}
- func (m *Model) GetPrimaryKeyStringValue() (string, error)
- func (m *Model) GetPrimaryKeyValue() interface{}
- func (m *Model) GetPrimaryKeyZeroValue() interface{}
- func (m *Model) IsFieldZero(field *mapping.StructField) (bool, error)
- func (m *Model) IsPrimaryKeyZero() bool
- func (m *Model) ParseFieldsStringValue(field *mapping.StructField, value string) (interface{}, error)
- func (m *Model) SetFieldValue(field *mapping.StructField, value interface{}) (err error)
- func (m *Model) SetFieldZeroValue(field *mapping.StructField) error
- func (m *Model) SetFrom(model mapping.Model) error
- func (m *Model) SetPrimaryKeyStringValue(value string) error
- func (m *Model) SetPrimaryKeyValue(value interface{}) error
- func (m *Model) StructFieldValue(field *mapping.StructField) (interface{}, error)
- type Models
- type NonPointerModels
Constants ¶
This section is empty.
Variables ¶
var Neuron_Models = []mapping.Model{ &Model{}, }
Neuron_Models stores all generated models in this package.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
ID int
}
Model is testing external model.
func (*Model) GetFieldValue ¶
func (m *Model) GetFieldValue(field *mapping.StructField) (interface{}, error)
GetFieldValue implements mapping.Fielder interface.
func (*Model) GetFieldZeroValue ¶
func (m *Model) GetFieldZeroValue(field *mapping.StructField) (interface{}, error)
GetFieldZeroValue implements mapping.Fielder interface.s
func (*Model) GetFieldsAddress ¶
func (m *Model) GetFieldsAddress(field *mapping.StructField) (interface{}, error)
GetFieldsAddress gets the address of provided 'field'.
func (*Model) GetHashableFieldValue ¶
func (m *Model) GetHashableFieldValue(field *mapping.StructField) (interface{}, error)
GetHashableFieldValue implements mapping.Fielder interface.
func (*Model) GetPrimaryKeyAddress ¶
func (m *Model) GetPrimaryKeyAddress() interface{}
GetPrimaryKeyAddress implements mapping.Model interface method.
func (*Model) GetPrimaryKeyHashableValue ¶
func (m *Model) GetPrimaryKeyHashableValue() interface{}
GetPrimaryKeyHashableValue implements mapping.Model interface method.
func (*Model) GetPrimaryKeyStringValue ¶
GetPrimaryKeyStringValue implements mapping.Model interface method.
func (*Model) GetPrimaryKeyValue ¶
func (m *Model) GetPrimaryKeyValue() interface{}
GetPrimaryKeyValue implements mapping.Model interface method.
func (*Model) GetPrimaryKeyZeroValue ¶
func (m *Model) GetPrimaryKeyZeroValue() interface{}
GetPrimaryKeyZeroValue implements mapping.Model interface method.
func (*Model) IsFieldZero ¶
func (m *Model) IsFieldZero(field *mapping.StructField) (bool, error)
IsFieldZero implements mapping.Fielder interface.
func (*Model) IsPrimaryKeyZero ¶
IsPrimaryKeyZero implements mapping.Model interface method.
func (*Model) ParseFieldsStringValue ¶
func (m *Model) ParseFieldsStringValue(field *mapping.StructField, value string) (interface{}, error)
SetPrimaryKeyStringValue implements mapping.Model interface method.
func (*Model) SetFieldValue ¶
func (m *Model) SetFieldValue(field *mapping.StructField, value interface{}) (err error)
SetFieldValue implements mapping.Fielder interface.
func (*Model) SetFieldZeroValue ¶
func (m *Model) SetFieldZeroValue(field *mapping.StructField) error
SetFieldZeroValue implements mapping.Fielder interface.s
func (*Model) SetPrimaryKeyStringValue ¶
SetPrimaryKeyStringValue implements mapping.Model interface method.
func (*Model) SetPrimaryKeyValue ¶
SetPrimaryKey implements mapping.Model interface method.
func (*Model) StructFieldValue ¶ added in v0.0.7
func (m *Model) StructFieldValue(field *mapping.StructField) (interface{}, error)
StructFieldValues gets the value for specified 'field'.
type NonPointerModels ¶ added in v0.0.6
type NonPointerModels []Model