Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareField ¶
func CompareModel ¶
func CompareTag ¶
func CompareType ¶
func CompareValue ¶
Types ¶
type Cache ¶
type Cache interface { Reset() Put(name string, info Model) Fetch(name string) Model Remove(name string) }
Cache Model Cache
type Field ¶
type Field interface { //@GetIndex Index GetIndex() int //@GetName Name GetName() string //@GetType Type GetType() Type //@GetTag Tag GetTag() Tag //@GetValue Value GetValue() Value //@SetValue 更新值 SetValue(val Value) error //@IsPrimary 是否主键 IsPrimary() bool }
Field Field
type Fields ¶
type Fields []Field
Fields field info collection
func (*Fields) GetPrimaryField ¶
GetPrimaryField get primary key field
type Filter ¶
type Filter interface { Equal(key string, val interface{}) error NotEqual(key string, val interface{}) error Below(key string, val interface{}) error Above(key string, val interface{}) error In(key string, val interface{}) error NotIn(key string, val interface{}) error Like(key string, val interface{}) error ValueMask(val interface{}) error Page(filter *util.Pagination) Sort(sorter *util.SortFilter) GetFilterItem(name string) FilterItem Pagination() (limit, offset int, paging bool) MaskModel() Model Sorter() Sorter }
Filter orm query filter
type FilterItem ¶
FilterItem FilterItem
type Model ¶
type Model interface { GetName() string GetPkgPath() string GetPkgKey() string GetFields() Fields SetFieldValue(name string, val Value) error GetPrimaryField() Field GetField(name string) Field Interface(ptrValue bool) interface{} Copy() Model Dump() string }
Model Model
type Tag ¶
type Tag interface { // Tag名称 GetName() string // 是否是主键 IsPrimaryKey() bool // 是否自增 IsAutoIncrement() bool }
Tag Tag
Click to show internal directories.
Click to hide internal directories.