Documentation ¶
Index ¶
- type Type
- func (t Type) DefaultGoType() reflect.Type
- func (t Type) Is2ManyRelationType() bool
- func (t Type) Is2OneRelationType() bool
- func (t Type) IsFKRelationType() bool
- func (t Type) IsNonStoredRelationType() bool
- func (t Type) IsNullInDB() bool
- func (t Type) IsRelationType() bool
- func (t Type) IsReverseRelationType() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Type ¶
type Type string
A Type defines a type of a model's field
const ( NoType Type = "" Binary Type = "binary" Boolean Type = "boolean" Char Type = "char" Date Type = "date" DateTime Type = "datetime" Float Type = "float" HTML Type = "html" Integer Type = "integer" Many2Many Type = "many2many" Many2One Type = "many2one" One2Many Type = "one2many" One2One Type = "one2one" Rev2One Type = "rev2one" Reference Type = "reference" Selection Type = "selection" Text Type = "text" )
Types for model fields
func (Type) DefaultGoType ¶
DefaultGoType returns this Type's default Go type
func (Type) Is2ManyRelationType ¶
Is2ManyRelationType returns true for relation types that point to multiple comodel records (i.e. M2M and O2M)
func (Type) Is2OneRelationType ¶
Is2OneRelationType returns true for relation types that point to a single comodel record (i.e. M2O, O2O and R2O)
func (Type) IsFKRelationType ¶
IsFKRelationType returns true for relation types that are stored in the model's table (i.e. M2O and O2O)
func (Type) IsNonStoredRelationType ¶
IsNonStoredRelationType returns true for relation types that are not stored in the model's table (i.e. M2M, O2M and R2O)
func (Type) IsNullInDB ¶
IsNullInDB returns true if this type's zero value is saved as null in database.
func (Type) IsRelationType ¶
IsRelationType returns true if this type is a relation.
func (Type) IsReverseRelationType ¶
IsReverseRelationType returns true for relation types that are stored in the comodel's table (i.e. O2M and R2O)