Documentation ¶
Index ¶
- Constants
- func CompareField(l, r Field) bool
- func CompareModel(l, r Model) bool
- func CompareSpec(l, r Spec) bool
- func CompareType(l, r Type) bool
- func CompareValue(l, r Value) bool
- func IsAutoIncrement(val ValueDeclare) bool
- func IsBasicSlice(tType Type) bool
- func IsBasicType(typeValue TypeDeclare) bool
- func IsCustomer(val ValueDeclare) bool
- func IsDateTime(val ValueDeclare) bool
- func IsDateTimeType(typeValue TypeDeclare) bool
- func IsMapType(typeVal TypeDeclare) bool
- func IsSliceType(typeValue TypeDeclare) bool
- func IsSnowFlake(val ValueDeclare) bool
- func IsStructSlice(tType Type) bool
- func IsStructType(typeValue TypeDeclare) bool
- func IsUUID(val ValueDeclare) bool
- type Cache
- type Field
- type Fields
- type Filter
- type FilterItem
- type Model
- type OprCode
- type Sorter
- type Spec
- type Type
- type TypeDeclare
- type Value
- type ValueDeclare
Constants ¶
View Source
const ( // TypeBooleanValue bool TypeBooleanValue = iota + 100 // TypeBitValue int8 TypeBitValue // TypeSmallIntegerValue int16 TypeSmallIntegerValue // TypeInteger32Value int32 TypeInteger32Value // TypeIntegerValue int TypeIntegerValue // TypeBigIntegerValue int64 TypeBigIntegerValue // TypePositiveBitValue uint8 TypePositiveBitValue // TypePositiveSmallIntegerValue uint16 TypePositiveSmallIntegerValue // TypePositiveInteger32Value uint32 TypePositiveInteger32Value // TypePositiveIntegerValue uint TypePositiveIntegerValue // TypePositiveBigIntegerValue uint64 TypePositiveBigIntegerValue // TypeFloatValue float32 TypeFloatValue // TypeDoubleValue float64 TypeDoubleValue // TypeStringValue string TypeStringValue // TypeDateTimeValue time.Time TypeDateTimeValue // TypeStructValue struct TypeStructValue // TypeSliceValue slice TypeSliceValue // TypeMapValue map TypeMapValue = 500 )
Define the Type enum
View Source
const ( EqualOpr = iota // = NotEqualOpr // != BelowOpr // < AboveOpr // > InOpr // in NotInOpr // not in LikeOpr // like )
Variables ¶
This section is empty.
Functions ¶
func CompareField ¶
func CompareModel ¶
func CompareSpec ¶ added in v1.3.23
func CompareType ¶
func CompareValue ¶
func IsAutoIncrement ¶ added in v1.3.28
func IsAutoIncrement(val ValueDeclare) bool
func IsBasicSlice ¶ added in v1.3.28
func IsBasicType ¶ added in v1.3.28
func IsBasicType(typeValue TypeDeclare) bool
func IsCustomer ¶ added in v1.3.28
func IsCustomer(val ValueDeclare) bool
func IsDateTime ¶ added in v1.3.28
func IsDateTime(val ValueDeclare) bool
func IsDateTimeType ¶ added in v1.3.28
func IsDateTimeType(typeValue TypeDeclare) bool
func IsMapType ¶ added in v1.3.28
func IsMapType(typeVal TypeDeclare) bool
func IsSliceType ¶ added in v1.3.28
func IsSliceType(typeValue TypeDeclare) bool
func IsSnowFlake ¶ added in v1.3.28
func IsSnowFlake(val ValueDeclare) bool
func IsStructSlice ¶ added in v1.3.28
func IsStructType ¶ added in v1.3.28
func IsStructType(typeValue TypeDeclare) bool
func IsUUID ¶ added in v1.3.28
func IsUUID(val ValueDeclare) bool
Types ¶
type Cache ¶
type Cache interface { Reset() Put(name string, vModel Model) Fetch(name string) Model Remove(name string) }
Cache Model Cache
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 any) error NotEqual(key string, val any) error Below(key string, val any) error Above(key string, val any) error In(key string, val any) error NotIn(key string, val any) error Like(key string, val any) error Page(page *util.Pagination) Sort(sorter *util.SortFilter) ValueMask(val any) error GetFilterItem(key string) FilterItem Pagination() (limit, offset int, paging bool) Sorter() Sorter MaskModel() Model }
Filter orm query filter
type FilterItem ¶
FilterItem FilterItem
type Spec ¶ added in v1.3.23
type Spec interface { IsPrimaryKey() bool GetValueDeclare() ValueDeclare }
type TypeDeclare ¶ added in v1.3.28
type TypeDeclare int
type Value ¶
type Value interface { IsNil() bool IsZero() bool Set(val any) Get() any Addr() Value Interface() any IsBasic() bool }
Value Value
type ValueDeclare ¶ added in v1.3.28
type ValueDeclare int
const ( Customer ValueDeclare = iota AutoIncrement UUID SnowFlake DateTime )
func (ValueDeclare) String ¶ added in v1.3.28
func (s ValueDeclare) String() string
Click to show internal directories.
Click to hide internal directories.