Documentation ¶
Index ¶
Constants ¶
View Source
const ( Invalid = Kind(types.Invalid) Bool = Kind(types.Bool) Int = Kind(types.Int) Int8 = Kind(types.Int8) Int16 = Kind(types.Int16) Int32 = Kind(types.Int32) Int64 = Kind(types.Int64) Uint = Kind(types.Uint) Uint8 = Kind(types.Uint8) Uint16 = Kind(types.Uint16) Uint32 = Kind(types.Uint32) Uint64 = Kind(types.Uint64) Float32 = Kind(types.Float32) Float64 = Kind(types.Float64) Complex64 = Kind(types.Complex64) Complex128 = Kind(types.Complex128) String = Kind(types.String) Interface = 101 Map = 102 Slice = 103 Struct = 104 )
View Source
const TagKey = "sql"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Kind ¶
func (Kind) IsSimpleType ¶
type Tag ¶
type Tag struct { Name string `yaml:"name"` Type string `yaml:"type"` Default string `yaml:"default"` Prefixed bool `yaml:"prefixed"` Primary bool `yaml:"pk"` Natural bool `yaml:"nk"` Auto bool `yaml:"auto"` Index string `yaml:"index"` Unique string `yaml:"unique"` //Check string `yaml:"check"` TODO ForeignKey string `yaml:"fk"` OnUpdate string `yaml:"onupdate"` OnDelete string `yaml:"ondelete"` Size int `yaml:"size"` Skip bool `yaml:"skip"` Encode string `yaml:"encode"` }
Tag stores the parsed data from the tag string in a struct field.
func ParseTag ¶
ParseTag parses a tag string from the struct field and unmarshals into a Tag struct.
func (Tag) ParentTable ¶
Click to show internal directories.
Click to hide internal directories.