Documentation ¶
Overview ¶
package field implement all type field and method
Index ¶
- Variables
- type AssignExpr
- type Bool
- func (field Bool) And(value bool) Expr
- func (field Bool) BitAnd(value bool) Expr
- func (field Bool) BitOr(value bool) Expr
- func (field Bool) BitXor(value bool) Expr
- func (field Bool) Is(value bool) Expr
- func (field Bool) Not() Bool
- func (field Bool) Or(value bool) Expr
- func (field Bool) Value(value bool) AssignExpr
- func (field Bool) Xor(value bool) Expr
- func (field Bool) Zero() AssignExpr
- type BuildOpt
- type Bytes
- func (field Bytes) Between(left []byte, right []byte) Expr
- func (field Bytes) Eq(value []byte) Expr
- func (field Bytes) FindInSet(targetList string) Expr
- func (field Bytes) FindInSetWith(target string) Expr
- func (field Bytes) Gt(value []byte) Expr
- func (field Bytes) Gte(value []byte) Expr
- func (field Bytes) IfNull(value []byte) Expr
- func (field Bytes) In(values ...[]byte) Expr
- func (field Bytes) Like(value string) Expr
- func (field Bytes) Lt(value []byte) Expr
- func (field Bytes) Lte(value []byte) Expr
- func (field Bytes) Neq(value []byte) Expr
- func (field Bytes) NotBetween(left []byte, right []byte) Expr
- func (field Bytes) NotIn(values ...[]byte) Expr
- func (field Bytes) NotLike(value string) Expr
- func (field Bytes) NotRegxp(value string) Expr
- func (field Bytes) Regexp(value string) Expr
- func (field Bytes) Value(value []byte) AssignExpr
- func (field Bytes) Zero() AssignExpr
- type CompareOperate
- type Expr
- type Field
- func (e Field) As(alias string) Expr
- func (e Field) AssignExpr() expression
- func (e Field) Avg() Float64
- func (e Field) BeCond() interface{}
- func (e Field) Build(stmt *gorm.Statement) sql
- func (e Field) BuildColumn(stmt *gorm.Statement, opts ...BuildOpt) sql
- func (e Field) BuildWithArgs(stmt *gorm.Statement) (sql, []interface{})
- func (e Field) ColumnName() sql
- func (Field) CondError() error
- func (e Field) Count() Int
- func (e Field) Desc() Expr
- func (e Field) Distinct() Int
- func (field Field) Eq(value driver.Valuer) Expr
- func (e Field) EqCol(col Expr) Expr
- func (e Field) GroupConcat() Expr
- func (field Field) Gt(value driver.Valuer) Expr
- func (e Field) GtCol(col Expr) Expr
- func (field Field) Gte(value driver.Valuer) Expr
- func (e Field) GteCol(col Expr) Expr
- func (field Field) IfNull(value driver.Valuer) Expr
- func (field Field) In(values ...driver.Valuer) Expr
- func (e Field) IsNotNull() Expr
- func (e Field) IsNull() Expr
- func (e Field) Length() Int
- func (field Field) Like(value driver.Valuer) Expr
- func (field Field) Lt(value driver.Valuer) Expr
- func (e Field) LtCol(col Expr) Expr
- func (field Field) Lte(value driver.Valuer) Expr
- func (e Field) LteCol(col Expr) Expr
- func (e Field) Max() Float64
- func (e Field) Min() Float64
- func (field Field) Neq(value driver.Valuer) Expr
- func (e Field) NeqCol(col Expr) Expr
- func (e Field) Null() AssignExpr
- func (e Field) RawExpr() expression
- func (e Field) SetCol(col Expr) AssignExpr
- func (field Field) Sum() Field
- func (field Field) Value(value driver.Valuer) AssignExpr
- func (e Field) WithTable(table string) Expr
- type FieldOption
- type Float32
- func (field Float32) Add(value float32) Float32
- func (field Float32) Between(left float32, right float32) Expr
- func (field Float32) Div(value float32) Float32
- func (field Float32) Eq(value float32) Expr
- func (field Float32) Floor() Int
- func (field Float32) FloorDiv(value float32) Int
- func (field Float32) Gt(value float32) Expr
- func (field Float32) Gte(value float32) Expr
- func (field Float32) IfNull(value float32) Expr
- func (field Float32) In(values ...float32) Expr
- func (field Float32) Like(value float32) Expr
- func (field Float32) Lt(value float32) Expr
- func (field Float32) Lte(value float32) Expr
- func (field Float32) Mul(value float32) Float32
- func (field Float32) Neq(value float32) Expr
- func (field Float32) NotBetween(left float32, right float32) Expr
- func (field Float32) NotIn(values ...float32) Expr
- func (field Float32) NotLike(value float32) Expr
- func (field Float32) Sub(value float32) Float32
- func (field Float32) Sum() Float32
- func (field Float32) Value(value float32) AssignExpr
- func (field Float32) Zero() AssignExpr
- type Float64
- func (field Float64) Add(value float64) Float64
- func (field Float64) Between(left float64, right float64) Expr
- func (field Float64) Div(value float64) Float64
- func (field Float64) Eq(value float64) Expr
- func (field Float64) Floor() Int
- func (field Float64) FloorDiv(value float64) Int
- func (field Float64) Gt(value float64) Expr
- func (field Float64) Gte(value float64) Expr
- func (field Float64) IfNull(value float64) Expr
- func (field Float64) In(values ...float64) Expr
- func (field Float64) Like(value float64) Expr
- func (field Float64) Lt(value float64) Expr
- func (field Float64) Lte(value float64) Expr
- func (field Float64) Mul(value float64) Float64
- func (field Float64) Neq(value float64) Expr
- func (field Float64) NotBetween(left float64, right float64) Expr
- func (field Float64) NotIn(values ...float64) Expr
- func (field Float64) NotLike(value float64) Expr
- func (field Float64) Sub(value float64) Float64
- func (field Float64) Sum() Float64
- func (field Float64) Value(value float64) AssignExpr
- func (field Float64) Zero() AssignExpr
- type Int
- func (field Int) Add(value int) Int
- func (field Int) Between(left int, right int) Expr
- func (field Int) BitAnd(value int) Int
- func (field Int) BitFlip() Int
- func (field Int) BitOr(value int) Int
- func (field Int) BitXor(value int) Int
- func (field Int) Div(value int) Int
- func (field Int) Eq(value int) Expr
- func (field Int) FloorDiv(value int) Int
- func (field Int) Gt(value int) Expr
- func (field Int) Gte(value int) Expr
- func (field Int) IfNull(value int) Expr
- func (field Int) In(values ...int) Expr
- func (field Int) LeftShift(value int) Int
- func (field Int) Like(value int) Expr
- func (field Int) Lt(value int) Expr
- func (field Int) Lte(value int) Expr
- func (field Int) Mod(value int) Int
- func (field Int) Mul(value int) Int
- func (field Int) Neq(value int) Expr
- func (field Int) NotBetween(left int, right int) Expr
- func (field Int) NotIn(values ...int) Expr
- func (field Int) NotLike(value int) Expr
- func (field Int) RightShift(value int) Int
- func (field Int) Sub(value int) Int
- func (field Int) Sum() Int
- func (field Int) Value(value int) AssignExpr
- func (field Int) Zero() AssignExpr
- type Int16
- func (field Int16) Add(value int16) Int16
- func (field Int16) Between(left int16, right int16) Expr
- func (field Int16) BitAnd(value int16) Int16
- func (field Int16) BitFlip() Int16
- func (field Int16) BitOr(value int16) Int16
- func (field Int16) BitXor(value int16) Int16
- func (field Int16) Div(value int16) Int16
- func (field Int16) Eq(value int16) Expr
- func (field Int16) FloorDiv(value int16) Int16
- func (field Int16) Gt(value int16) Expr
- func (field Int16) Gte(value int16) Expr
- func (field Int16) IfNull(value int16) Expr
- func (field Int16) In(values ...int16) Expr
- func (field Int16) LeftShift(value int16) Int16
- func (field Int16) Like(value int16) Expr
- func (field Int16) Lt(value int16) Expr
- func (field Int16) Lte(value int16) Expr
- func (field Int16) Mod(value int16) Int16
- func (field Int16) Mul(value int16) Int16
- func (field Int16) Neq(value int16) Expr
- func (field Int16) NotBetween(left int16, right int16) Expr
- func (field Int16) NotIn(values ...int16) Expr
- func (field Int16) NotLike(value int16) Expr
- func (field Int16) RightShift(value int16) Int16
- func (field Int16) Sub(value int16) Int16
- func (field Int16) Sum() Int16
- func (field Int16) Value(value int16) AssignExpr
- func (field Int16) Zero() AssignExpr
- type Int32
- func (field Int32) Add(value int32) Int32
- func (field Int32) Between(left int32, right int32) Expr
- func (field Int32) BitAnd(value int32) Int32
- func (field Int32) BitFlip() Int32
- func (field Int32) BitOr(value int32) Int32
- func (field Int32) BitXor(value int32) Int32
- func (field Int32) Div(value int32) Int32
- func (field Int32) Eq(value int32) Expr
- func (field Int32) FloorDiv(value int32) Int32
- func (field Int32) Gt(value int32) Expr
- func (field Int32) Gte(value int32) Expr
- func (field Int32) IfNull(value int32) Expr
- func (field Int32) In(values ...int32) Expr
- func (field Int32) LeftShift(value int32) Int32
- func (field Int32) Like(value int32) Expr
- func (field Int32) Lt(value int32) Expr
- func (field Int32) Lte(value int32) Expr
- func (field Int32) Mod(value int32) Int32
- func (field Int32) Mul(value int32) Int32
- func (field Int32) Neq(value int32) Expr
- func (field Int32) NotBetween(left int32, right int32) Expr
- func (field Int32) NotIn(values ...int32) Expr
- func (field Int32) NotLike(value int32) Expr
- func (field Int32) RightShift(value int32) Int32
- func (field Int32) Sub(value int32) Int32
- func (field Int32) Sum() Int32
- func (field Int32) Value(value int32) AssignExpr
- func (field Int32) Zero() AssignExpr
- type Int64
- func (field Int64) Add(value int64) Int64
- func (field Int64) Between(left int64, right int64) Expr
- func (field Int64) BitAnd(value int64) Int64
- func (field Int64) BitFlip() Int64
- func (field Int64) BitOr(value int64) Int64
- func (field Int64) BitXor(value int64) Int64
- func (field Int64) Div(value int64) Int64
- func (field Int64) Eq(value int64) Expr
- func (field Int64) FloorDiv(value int64) Int64
- func (field Int64) Gt(value int64) Expr
- func (field Int64) Gte(value int64) Expr
- func (field Int64) IfNull(value int64) Expr
- func (field Int64) In(values ...int64) Expr
- func (field Int64) LeftShift(value int64) Int64
- func (field Int64) Like(value int64) Expr
- func (field Int64) Lt(value int64) Expr
- func (field Int64) Lte(value int64) Expr
- func (field Int64) Mod(value int64) Int64
- func (field Int64) Mul(value int64) Int64
- func (field Int64) Neq(value int64) Expr
- func (field Int64) NotBetween(left int64, right int64) Expr
- func (field Int64) NotIn(values ...int64) Expr
- func (field Int64) NotLike(value int64) Expr
- func (field Int64) RightShift(value int64) Int64
- func (field Int64) Sub(value int64) Int64
- func (field Int64) Sum() Int64
- func (field Int64) Value(value int64) AssignExpr
- func (field Int64) Zero() AssignExpr
- type Int8
- func (field Int8) Add(value int8) Int8
- func (field Int8) Between(left int8, right int8) Expr
- func (field Int8) BitAnd(value int8) Int8
- func (field Int8) BitFlip() Int8
- func (field Int8) BitOr(value int8) Int8
- func (field Int8) BitXor(value int8) Int8
- func (field Int8) Div(value int8) Int8
- func (field Int8) Eq(value int8) Expr
- func (field Int8) FloorDiv(value int8) Int8
- func (field Int8) Gt(value int8) Expr
- func (field Int8) Gte(value int8) Expr
- func (field Int8) IfNull(value int8) Expr
- func (field Int8) In(values ...int8) Expr
- func (field Int8) LeftShift(value int8) Int8
- func (field Int8) Like(value int8) Expr
- func (field Int8) Lt(value int8) Expr
- func (field Int8) Lte(value int8) Expr
- func (field Int8) Mod(value int8) Int8
- func (field Int8) Mul(value int8) Int8
- func (field Int8) Neq(value int8) Expr
- func (field Int8) NotBetween(left int8, right int8) Expr
- func (field Int8) NotIn(values ...int8) Expr
- func (field Int8) NotLike(value int8) Expr
- func (field Int8) RightShift(value int8) Int8
- func (field Int8) Sub(value int8) Int8
- func (field Int8) Sum() Int8
- func (field Int8) Value(value int8) AssignExpr
- func (field Int8) Zero() AssignExpr
- type OrderExpr
- type RelateConfig
- type Relation
- func NewRelation(fieldName string, fieldType string, relations ...Relation) *Relation
- func NewRelationWithModel(relationship RelationshipType, fieldName string, fieldType string, ...) *Relation
- func NewRelationWithType(relationship RelationshipType, fieldName string, fieldType string, ...) *Relation
- func (r *Relation) AppendChildRelation(relations ...Relation)
- func (r Relation) ChildRelations() []Relation
- func (r Relation) Clauses(hints ...clause.Expression) RelationField
- func (r Relation) Field(fields ...string) Expr
- func (r *Relation) GetClauses() []clause.Expression
- func (r *Relation) GetConds() []Expr
- func (r *Relation) GetOrderCol() []Expr
- func (r *Relation) GetPage() (offset, limit int)
- func (r *Relation) GetSelects() []Expr
- func (r Relation) Limit(limit int) RelationField
- func (r Relation) Model() interface{}
- func (r Relation) Name() string
- func (r Relation) Offset(offset int) RelationField
- func (r Relation) On(conds ...Expr) RelationField
- func (r Relation) Order(columns ...Expr) RelationField
- func (r Relation) Path() string
- func (r Relation) Relationship() RelationshipType
- func (r Relation) RelationshipName() string
- func (r Relation) Select(columns ...Expr) RelationField
- func (r *Relation) StructField() (fieldStr string)
- func (r *Relation) StructFieldInit() string
- func (r Relation) Type() string
- type RelationField
- type RelationshipType
- type ScanValuer
- type String
- func (field String) Between(left string, right string) Expr
- func (field String) Eq(value string) Expr
- func (field String) FindInSet(targetList string) Expr
- func (field String) FindInSetWith(target string) Expr
- func (field String) Gt(value string) Expr
- func (field String) Gte(value string) Expr
- func (field String) IfNull(value string) Expr
- func (field String) In(values ...string) Expr
- func (field String) Like(value string) Expr
- func (field String) Lt(value string) Expr
- func (field String) Lte(value string) Expr
- func (field String) Neq(value string) Expr
- func (field String) NotBetween(left string, right string) Expr
- func (field String) NotIn(values ...string) Expr
- func (field String) NotLike(value string) Expr
- func (field String) NotRegxp(value string) Expr
- func (field String) Regexp(value string) Expr
- func (field String) Value(value string) AssignExpr
- func (field String) Zero() AssignExpr
- type Time
- func (field Time) Add(value time.Duration) Time
- func (field Time) Between(left time.Time, right time.Time) Expr
- func (field Time) CurDate() Time
- func (field Time) CurTime() Time
- func (field Time) Date() Time
- func (field Time) DateDiff(value time.Time) Int
- func (field Time) DateFormat(value string) String
- func (field Time) Day() Int
- func (field Time) DayName() String
- func (field Time) DayOfMonth() Int
- func (field Time) DayOfWeek() Int
- func (field Time) DayOfYear() Int
- func (field Time) Eq(value time.Time) Expr
- func (field Time) FromDays(value int) Time
- func (field Time) FromUnixtime(value int) Time
- func (field Time) Gt(value time.Time) Expr
- func (field Time) Gte(value time.Time) Expr
- func (field Time) Hour() Int
- func (field Time) IfNull(value Time) Expr
- func (field Time) In(values ...time.Time) Expr
- func (field Time) Lt(value time.Time) Expr
- func (field Time) Lte(value time.Time) Expr
- func (field Time) MicroSecond() Int
- func (field Time) Minute() Int
- func (field Time) Month() Int
- func (field Time) MonthName() String
- func (field Time) Neq(value time.Time) Expr
- func (field Time) NotBetween(left time.Time, right time.Time) Expr
- func (field Time) NotIn(values ...time.Time) Expr
- func (field Time) Now() Time
- func (field Time) Second() Int
- func (field Time) Sub(value time.Duration) Time
- func (field Time) Sum() Time
- func (field Time) Value(value time.Time) AssignExpr
- func (field Time) Zero() AssignExpr
- type Uint
- func (field Uint) Add(value uint) Uint
- func (field Uint) Between(left uint, right uint) Expr
- func (field Uint) BitAnd(value uint) Uint
- func (field Uint) BitFlip() Uint
- func (field Uint) BitOr(value uint) Uint
- func (field Uint) BitXor(value uint) Uint
- func (field Uint) Div(value uint) Uint
- func (field Uint) Eq(value uint) Expr
- func (field Uint) FloorDiv(value uint) Uint
- func (field Uint) Gt(value uint) Expr
- func (field Uint) Gte(value uint) Expr
- func (field Uint) IfNull(value uint) Expr
- func (field Uint) In(values ...uint) Expr
- func (field Uint) LeftShift(value uint) Uint
- func (field Uint) Like(value uint) Expr
- func (field Uint) Lt(value uint) Expr
- func (field Uint) Lte(value uint) Expr
- func (field Uint) Mod(value uint) Uint
- func (field Uint) Mul(value uint) Uint
- func (field Uint) Neq(value uint) Expr
- func (field Uint) NotBetween(left uint, right uint) Expr
- func (field Uint) NotIn(values ...uint) Expr
- func (field Uint) NotLike(value uint) Expr
- func (field Uint) RightShift(value uint) Uint
- func (field Uint) Sub(value uint) Uint
- func (field Uint) Sum() Uint
- func (field Uint) Value(value uint) AssignExpr
- func (field Uint) Zero() AssignExpr
- type Uint16
- func (field Uint16) Add(value uint16) Uint16
- func (field Uint16) Between(left uint16, right uint16) Expr
- func (field Uint16) BitAnd(value uint16) Uint16
- func (field Uint16) BitFlip() Uint16
- func (field Uint16) BitOr(value uint16) Uint16
- func (field Uint16) BitXor(value uint16) Uint16
- func (field Uint16) Div(value uint16) Uint16
- func (field Uint16) Eq(value uint16) Expr
- func (field Uint16) FloorDiv(value uint16) Uint16
- func (field Uint16) Gt(value uint16) Expr
- func (field Uint16) Gte(value uint16) Expr
- func (field Uint16) IfNull(value uint16) Expr
- func (field Uint16) In(values ...uint16) Expr
- func (field Uint16) LeftShift(value uint16) Uint16
- func (field Uint16) Like(value uint16) Expr
- func (field Uint16) Lt(value uint16) Expr
- func (field Uint16) Lte(value uint16) Expr
- func (field Uint16) Mod(value uint16) Uint16
- func (field Uint16) Mul(value uint16) Uint16
- func (field Uint16) Neq(value uint16) Expr
- func (field Uint16) NotBetween(left uint16, right uint16) Expr
- func (field Uint16) NotIn(values ...uint16) Expr
- func (field Uint16) NotLike(value uint16) Expr
- func (field Uint16) RightShift(value uint16) Uint16
- func (field Uint16) Sub(value uint16) Uint16
- func (field Uint16) Sum() Uint16
- func (field Uint16) Value(value uint16) AssignExpr
- func (field Uint16) Zero() AssignExpr
- type Uint32
- func (field Uint32) Add(value uint32) Uint32
- func (field Uint32) Between(left uint32, right uint32) Expr
- func (field Uint32) BitAnd(value uint32) Uint32
- func (field Uint32) BitFlip() Uint32
- func (field Uint32) BitOr(value uint32) Uint32
- func (field Uint32) BitXor(value uint32) Uint32
- func (field Uint32) Div(value uint32) Uint32
- func (field Uint32) Eq(value uint32) Expr
- func (field Uint32) FloorDiv(value uint32) Uint32
- func (field Uint32) Gt(value uint32) Expr
- func (field Uint32) Gte(value uint32) Expr
- func (field Uint32) IfNull(value uint32) Expr
- func (field Uint32) In(values ...uint32) Expr
- func (field Uint32) LeftShift(value uint32) Uint32
- func (field Uint32) Like(value uint32) Expr
- func (field Uint32) Lt(value uint32) Expr
- func (field Uint32) Lte(value uint32) Expr
- func (field Uint32) Mod(value uint32) Uint32
- func (field Uint32) Mul(value uint32) Uint32
- func (field Uint32) Neq(value uint32) Expr
- func (field Uint32) NotBetween(left uint32, right uint32) Expr
- func (field Uint32) NotIn(values ...uint32) Expr
- func (field Uint32) NotLike(value uint32) Expr
- func (field Uint32) RightShift(value uint32) Uint32
- func (field Uint32) Sub(value uint32) Uint32
- func (field Uint32) Sum() Uint32
- func (field Uint32) Value(value uint32) AssignExpr
- func (field Uint32) Zero() AssignExpr
- type Uint64
- func (field Uint64) Add(value uint64) Uint64
- func (field Uint64) Between(left uint64, right uint64) Expr
- func (field Uint64) BitAnd(value uint64) Uint64
- func (field Uint64) BitFlip() Uint64
- func (field Uint64) BitOr(value uint64) Uint64
- func (field Uint64) BitXor(value uint64) Uint64
- func (field Uint64) Div(value uint64) Uint64
- func (field Uint64) Eq(value uint64) Expr
- func (field Uint64) FloorDiv(value uint64) Uint64
- func (field Uint64) Gt(value uint64) Expr
- func (field Uint64) Gte(value uint64) Expr
- func (field Uint64) IfNull(value uint64) Expr
- func (field Uint64) In(values ...uint64) Expr
- func (field Uint64) LeftShift(value uint64) Uint64
- func (field Uint64) Like(value uint64) Expr
- func (field Uint64) Lt(value uint64) Expr
- func (field Uint64) Lte(value uint64) Expr
- func (field Uint64) Mod(value uint64) Uint64
- func (field Uint64) Mul(value uint64) Uint64
- func (field Uint64) Neq(value uint64) Expr
- func (field Uint64) NotBetween(left uint64, right uint64) Expr
- func (field Uint64) NotIn(values ...uint64) Expr
- func (field Uint64) NotLike(value uint64) Expr
- func (field Uint64) RightShift(value uint64) Uint64
- func (field Uint64) Sub(value uint64) Uint64
- func (field Uint64) Sum() Uint64
- func (field Uint64) Value(value uint64) AssignExpr
- func (field Uint64) Zero() AssignExpr
- type Uint8
- func (field Uint8) Add(value uint8) Uint8
- func (field Uint8) Between(left uint8, right uint8) Expr
- func (field Uint8) BitAnd(value uint8) Uint8
- func (field Uint8) BitFlip() Uint8
- func (field Uint8) BitOr(value uint8) Uint8
- func (field Uint8) BitXor(value uint8) Uint8
- func (field Uint8) Div(value uint8) Uint8
- func (field Uint8) Eq(value uint8) Expr
- func (field Uint8) FloorDiv(value uint8) Uint8
- func (field Uint8) Gt(value uint8) Expr
- func (field Uint8) Gte(value uint8) Expr
- func (field Uint8) IfNull(value uint8) Expr
- func (field Uint8) In(values ...uint8) Expr
- func (field Uint8) LeftShift(value uint8) Uint8
- func (field Uint8) Like(value uint8) Expr
- func (field Uint8) Lt(value uint8) Expr
- func (field Uint8) Lte(value uint8) Expr
- func (field Uint8) Mod(value uint8) Uint8
- func (field Uint8) Mul(value uint8) Uint8
- func (field Uint8) Neq(value uint8) Expr
- func (field Uint8) NotBetween(left uint8, right uint8) Expr
- func (field Uint8) NotIn(values ...uint8) Expr
- func (field Uint8) NotLike(value uint8) Expr
- func (field Uint8) RightShift(value uint8) Uint8
- func (field Uint8) Sub(value uint8) Uint8
- func (field Uint8) Sum() Uint8
- func (field Uint8) Value(value uint8) AssignExpr
- func (field Uint8) Zero() AssignExpr
- type Value
Constants ¶
This section is empty.
Variables ¶
View Source
var ALL = Star
View Source
var Func = new(function)
Func sql functions
View Source
var Star = NewString("", "*")
Star a symbol of "*"
Functions ¶
This section is empty.
Types ¶
type AssignExpr ¶
type AssignExpr interface { Expr AssignExpr() expression }
func AssignSubQuery ¶
func AssignSubQuery(columns []Expr, subQuery *gorm.DB) AssignExpr
type Bool ¶
type Bool Field
func NewBool ¶
func NewBool(table, column string, opts ...FieldOption) Bool
func (Bool) Value ¶
func (field Bool) Value(value bool) AssignExpr
func (Bool) Zero ¶
func (field Bool) Zero() AssignExpr
type Bytes ¶
type Bytes String
func NewBytes ¶
func NewBytes(table, column string, opts ...FieldOption) Bytes
func (Bytes) FindInSetWith ¶
FindInSetWith FIND_IN_SET(input_string, field_name)
func (Bytes) Value ¶
func (field Bytes) Value(value []byte) AssignExpr
func (Bytes) Zero ¶
func (field Bytes) Zero() AssignExpr
type CompareOperate ¶
type CompareOperate string
const ( EqOp CompareOperate = " = " NeqOp CompareOperate = " <> " GtOp CompareOperate = " > " GteOp CompareOperate = " >= " LtOp CompareOperate = " < " LteOp CompareOperate = " <= " ExistsOp CompareOperate = "EXISTS " )
type Expr ¶
type Expr interface { As(alias string) Expr ColumnName() sql BuildColumn(*gorm.Statement, ...BuildOpt) sql Build(*gorm.Statement) sql BuildWithArgs(*gorm.Statement) (query sql, args []interface{}) RawExpr() expression // implement Condition BeCond() interface{} CondError() error // contains filtered or unexported methods }
Expr a query expression about field
var AssociationFields Expr = NewString("", clause.Associations)
func CompareSubQuery ¶
func CompareSubQuery(op CompareOperate, column Expr, subQuery *gorm.DB) Expr
func ContainsSubQuery ¶
======================== subquery method ========================
func ContainsValue ¶
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
Field a standard field struct
func NewField ¶
func NewField(table, column string, opts ...FieldOption) Field
func (Field) AssignExpr ¶
func (e Field) AssignExpr() expression
func (Field) BuildColumn ¶
func (Field) BuildWithArgs ¶
func (Field) ColumnName ¶
func (e Field) ColumnName() sql
func (Field) GroupConcat ¶
func (e Field) GroupConcat() Expr
func (Field) Null ¶
func (e Field) Null() AssignExpr
func (Field) SetCol ¶
func (e Field) SetCol(col Expr) AssignExpr
type Float32 ¶
type Float32 Float64
func NewFloat32 ¶
func NewFloat32(table, column string, opts ...FieldOption) Float32
func (Float32) Value ¶
func (field Float32) Value(value float32) AssignExpr
func (Float32) Zero ¶
func (field Float32) Zero() AssignExpr
type Float64 ¶
type Float64 Field
func NewFloat64 ¶
func NewFloat64(table, column string, opts ...FieldOption) Float64
func (Float64) Value ¶
func (field Float64) Value(value float64) AssignExpr
func (Float64) Zero ¶
func (field Float64) Zero() AssignExpr
type Int ¶
type Int Field
func NewInt ¶
func NewInt(table, column string, opts ...FieldOption) Int
func (Int) RightShift ¶
func (Int) Value ¶
func (field Int) Value(value int) AssignExpr
func (Int) Zero ¶
func (field Int) Zero() AssignExpr
type Int16 ¶
type Int16 Int
func NewInt16 ¶
func NewInt16(table, column string, opts ...FieldOption) Int16
func (Int16) RightShift ¶
func (Int16) Value ¶
func (field Int16) Value(value int16) AssignExpr
func (Int16) Zero ¶
func (field Int16) Zero() AssignExpr
type Int32 ¶
type Int32 Int
func NewInt32 ¶
func NewInt32(table, column string, opts ...FieldOption) Int32
func (Int32) RightShift ¶
func (Int32) Value ¶
func (field Int32) Value(value int32) AssignExpr
func (Int32) Zero ¶
func (field Int32) Zero() AssignExpr
type Int64 ¶
type Int64 Int
func NewInt64 ¶
func NewInt64(table, column string, opts ...FieldOption) Int64
func (Int64) RightShift ¶
func (Int64) Value ¶
func (field Int64) Value(value int64) AssignExpr
func (Int64) Zero ¶
func (field Int64) Zero() AssignExpr
type Int8 ¶
type Int8 Int
func NewInt8 ¶
func NewInt8(table, column string, opts ...FieldOption) Int8
func (Int8) RightShift ¶
func (Int8) Value ¶
func (field Int8) Value(value int8) AssignExpr
func (Int8) Zero ¶
func (field Int8) Zero() AssignExpr
type RelateConfig ¶
type RelateConfig struct { RelatePointer bool RelateSlice bool RelateSlicePointer bool JSONTag string GORMTag string NewTag string OverwriteTag string }
func (*RelateConfig) RelateFieldPrefix ¶
func (c *RelateConfig) RelateFieldPrefix(relationshipType RelationshipType) string
type Relation ¶
type Relation struct {
// contains filtered or unexported fields
}
func NewRelation ¶
func NewRelationWithModel ¶
func NewRelationWithModel(relationship RelationshipType, fieldName string, fieldType string, fieldModel interface{}, relations ...Relation) *Relation
func NewRelationWithType ¶
func NewRelationWithType(relationship RelationshipType, fieldName string, fieldType string, relations ...Relation) *Relation
func (*Relation) AppendChildRelation ¶
func (Relation) ChildRelations ¶
func (Relation) Clauses ¶
func (r Relation) Clauses(hints ...clause.Expression) RelationField
func (*Relation) GetClauses ¶
func (r *Relation) GetClauses() []clause.Expression
func (*Relation) GetOrderCol ¶
func (*Relation) GetSelects ¶
func (Relation) Limit ¶
func (r Relation) Limit(limit int) RelationField
func (Relation) Offset ¶
func (r Relation) Offset(offset int) RelationField
func (Relation) On ¶
func (r Relation) On(conds ...Expr) RelationField
func (Relation) Order ¶
func (r Relation) Order(columns ...Expr) RelationField
func (Relation) Relationship ¶
func (r Relation) Relationship() RelationshipType
func (Relation) RelationshipName ¶
func (Relation) Select ¶
func (r Relation) Select(columns ...Expr) RelationField
func (*Relation) StructField ¶
func (*Relation) StructFieldInit ¶
type RelationField ¶
type RelationField interface { Name() string Path() string Field(fields ...string) Expr On(conds ...Expr) RelationField Select(conds ...Expr) RelationField Order(columns ...Expr) RelationField Clauses(hints ...clause.Expression) RelationField Offset(offset int) RelationField Limit(limit int) RelationField GetConds() []Expr GetSelects() []Expr GetOrderCol() []Expr GetClauses() []clause.Expression GetPage() (offset, limit int) }
var Associations RelationField = NewRelation(clause.Associations, "")
type RelationshipType ¶
type RelationshipType schema.RelationshipType
const ( HasOne RelationshipType = RelationshipType(schema.HasOne) // HasOneRel has one relationship HasMany RelationshipType = RelationshipType(schema.HasMany) // HasManyRel has many relationships BelongsTo RelationshipType = RelationshipType(schema.BelongsTo) // BelongsToRel belongs to relationship Many2Many RelationshipType = RelationshipType(schema.Many2Many) // Many2ManyRel many to many relationship )
type ScanValuer ¶
type String ¶
type String Field
func NewString ¶
func NewString(table, column string, opts ...FieldOption) String
func (String) FindInSetWith ¶
FindInSetWith FIND_IN_SET(input_string, field_name)
func (String) Value ¶
func (field String) Value(value string) AssignExpr
func (String) Zero ¶
func (field String) Zero() AssignExpr
type Time ¶
type Time Field
func NewTime ¶
func NewTime(table, column string, opts ...FieldOption) Time
func (Time) DateFormat ¶
func (Time) DayOfMonth ¶
func (Time) FromUnixtime ¶
func (Time) MicroSecond ¶
func (Time) Zero ¶
func (field Time) Zero() AssignExpr
type Uint ¶
type Uint Int
func NewUint ¶
func NewUint(table, column string, opts ...FieldOption) Uint
func (Uint) RightShift ¶
func (Uint) Value ¶
func (field Uint) Value(value uint) AssignExpr
func (Uint) Zero ¶
func (field Uint) Zero() AssignExpr
type Uint16 ¶
type Uint16 Int
func NewUint16 ¶
func NewUint16(table, column string, opts ...FieldOption) Uint16
func (Uint16) RightShift ¶
func (Uint16) Value ¶
func (field Uint16) Value(value uint16) AssignExpr
func (Uint16) Zero ¶
func (field Uint16) Zero() AssignExpr
type Uint32 ¶
type Uint32 Int
func NewUint32 ¶
func NewUint32(table, column string, opts ...FieldOption) Uint32
func (Uint32) RightShift ¶
func (Uint32) Value ¶
func (field Uint32) Value(value uint32) AssignExpr
func (Uint32) Zero ¶
func (field Uint32) Zero() AssignExpr
type Uint64 ¶
type Uint64 Int
func NewUint64 ¶
func NewUint64(table, column string, opts ...FieldOption) Uint64
func (Uint64) RightShift ¶
func (Uint64) Value ¶
func (field Uint64) Value(value uint64) AssignExpr
func (Uint64) Zero ¶
func (field Uint64) Zero() AssignExpr
type Uint8 ¶
type Uint8 Int
func NewUint8 ¶
func NewUint8(table, column string, opts ...FieldOption) Uint8
func (Uint8) RightShift ¶
func (Uint8) Value ¶
func (field Uint8) Value(value uint8) AssignExpr
func (Uint8) Zero ¶
func (field Uint8) Zero() AssignExpr
Click to show internal directories.
Click to hide internal directories.