Documentation ¶
Index ¶
- Variables
- func Indirect(value interface{}) reflect.Type
- func IntoExpression(conds ...Expr) []clause.Expression
- func IntoIntegerSlice[T constraints.Integer, R constraints.Integer](values []T) []R
- func IntoSlice[T any, R any](values []T, f func(T) R) []R
- func Paginate(page, perPage int64, maxPerPages ...int64) clause.Expression
- type Asterisk
- func (e Asterisk) AddCol(col Expr) Expr
- func (e Asterisk) As(alias string) Expr
- func (e Asterisk) Avg() Float64
- func (e Asterisk) Build(builder clause.Builder)
- func (e Asterisk) BuildColumn(stmt *gorm.Statement, opts ...BuildOption) string
- func (e Asterisk) BuildWithArgs(stmt *gorm.Statement) (string, []any)
- func (e Asterisk) ColumnName() string
- func (e Asterisk) ConcatCol(cols ...Expr) Expr
- func (a Asterisk) Count() Asterisk
- func (e Asterisk) Desc() Expr
- func (a Asterisk) Distinct() Asterisk
- func (e Asterisk) DivCol(col Expr) Expr
- func (e Asterisk) EqCol(col Expr) Expr
- func (e Asterisk) Expression() clause.Expression
- func (e Asterisk) GroupConcat() Expr
- func (e Asterisk) GtCol(col Expr) Expr
- func (e Asterisk) GteCol(col Expr) Expr
- func (e Asterisk) IsNotNull() Expr
- func (e Asterisk) IsNull() Expr
- func (e Asterisk) Length() Int
- func (e Asterisk) LtCol(col Expr) Expr
- func (e Asterisk) LteCol(col Expr) Expr
- func (e Asterisk) Max() Float64
- func (e Asterisk) Min() Float64
- func (e Asterisk) MulCol(col Expr) Expr
- func (e Asterisk) NeqCol(col Expr) Expr
- func (e Asterisk) RawExpr() expression
- func (e Asterisk) SubCol(col Expr) Expr
- func (e Asterisk) WithTable(table string) Expr
- 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) Eq(value bool) Expr
- func (field Bool) IfNull(value bool) Expr
- func (field Bool) IntoColumns() Columns
- func (field Bool) Is(value bool) Expr
- func (field Bool) Neq(value bool) Expr
- func (field Bool) Not() Expr
- func (field Bool) Or(value bool) Expr
- func (field Bool) Xor(value bool) Expr
- type BuildOption
- 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) FuzzyLike(value 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) IntoColumns() Columns
- func (field Bytes) LeftLike(value string) 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) SubstringIndex(delim string, count int) Bytes
- type Columns
- func (cs Columns) Eq(subQuery *gorm.DB) Expr
- func (cs Columns) Gt(subQuery *gorm.DB) Expr
- func (cs Columns) Gte(subQuery *gorm.DB) Expr
- func (cs Columns) In(subQueryOrValue any) Expr
- func (cs Columns) Lt(subQuery *gorm.DB) Expr
- func (cs Columns) Lte(subQuery *gorm.DB) Expr
- func (cs Columns) Neq(subQuery *gorm.DB) Expr
- func (cs Columns) NotIn(subQueryOrValue any) Expr
- type Condition
- func CrossJoin(tableName string, conds ...Expr) Condition
- func CrossJoinX(tableName, alias string, conds ...Expr) Condition
- func Group(columns ...Expr) Condition
- func Having(columns ...Expr) Condition
- func InnerJoin(tableName string, conds ...Expr) Condition
- func InnerJoinX(tableName, alias string, conds ...Expr) Condition
- func Join(tableName string, conds ...Expr) Condition
- func JoinX(tableName, alias string, conds ...Expr) Condition
- func LeftJoin(tableName string, conds ...Expr) Condition
- func LeftJoinX(tableName, alias string, conds ...Expr) Condition
- func LockingShare() Condition
- func LockingUpdate() Condition
- func Order(columns ...Expr) Condition
- func Pagination(page, perPage int64, maxPerPages ...int64) Condition
- func RightJoin(tableName string, conds ...Expr) Condition
- func RightJoinX(tableName, alias string, conds ...Expr) Condition
- func Select(columns ...Expr) Condition
- func Table(fromSubs ...From) Condition
- func Where(columns ...Expr) Condition
- type Conditions
- func (c Conditions) Append(cs ...Condition) Conditions
- func (c Conditions) Build() []Condition
- func (c Conditions) CrossJoin(tableName string, conds ...Expr) Conditions
- func (c Conditions) CrossJoinX(tableName, alias string, conds ...Expr) Conditions
- func (c Conditions) Group(columns ...Expr) Conditions
- func (c Conditions) Having(columns ...Expr) Conditions
- func (c Conditions) InnerJoin(tableName string, conds ...Expr) Conditions
- func (c Conditions) InnerJoinX(tableName, alias string, conds ...Expr) Conditions
- func (c Conditions) Join(tableName string, conds ...Expr) Conditions
- func (c Conditions) JoinX(tableName, alias string, conds ...Expr) Conditions
- func (c Conditions) LeftJoin(tableName string, conds ...Expr) Conditions
- func (c Conditions) LeftJoinX(tableName, alias string, conds ...Expr) Conditions
- func (c Conditions) LockingShare() Conditions
- func (c Conditions) LockingUpdate() Conditions
- func (c Conditions) Order(columns ...Expr) Conditions
- func (c Conditions) Pagination(page, perPage int64, maxPages ...int64) Conditions
- func (c Conditions) RightJoin(tableName string, conds ...Expr) Conditions
- func (c Conditions) RightJoinX(tableName, alias string, conds ...Expr) Conditions
- func (c Conditions) Select(columns ...Expr) Conditions
- func (c Conditions) Table(fromSubs ...From) Conditions
- func (c Conditions) Where(columns ...Expr) Conditions
- type Decimal
- type Expr
- type Field
- func (field Field) Add(value any) Field
- func (e Field) AddCol(col Expr) Expr
- func (e Field) As(alias string) Expr
- func (e Field) Avg() Float64
- func (field Field) Between(left any, right any) Expr
- func (field Field) BitAnd(value any) Field
- func (field Field) BitFlip() Field
- func (field Field) BitOr(value any) Field
- func (field Field) BitXor(value any) Field
- func (e Field) Build(builder clause.Builder)
- func (e Field) BuildColumn(stmt *gorm.Statement, opts ...BuildOption) string
- func (e Field) BuildWithArgs(stmt *gorm.Statement) (string, []any)
- func (e Field) ColumnName() string
- func (field Field) Concat(before, after string) String
- func (e Field) ConcatCol(cols ...Expr) Expr
- func (e Field) Count() Int
- func (field Field) Date() Time
- func (field Field) DateDiff(expr2 time.Time) Int
- func (field Field) DateFormat(format string) String
- func (field Field) Day() Int
- func (field Field) DayName() String
- func (field Field) DayOfMonth() Int
- func (field Field) DayOfWeek() Int
- func (field Field) DayOfYear() Int
- func (e Field) Desc() Expr
- func (e Field) Distinct() Int
- func (field Field) Div(value any) Field
- func (e Field) DivCol(col Expr) Expr
- func (field Field) Eq(value any) Expr
- func (e Field) EqCol(col Expr) Expr
- func (e Field) Expression() clause.Expression
- func (field Field) FindInSet(targetList string) Expr
- func (field Field) FindInSetWith(target string) Expr
- func (field Field) Floor() Field
- func (field Field) FloorDiv(value any) Field
- func (field Field) FromDays() Time
- func (field Field) FromUnixTime(format ...string) String
- func (e Field) GroupConcat() Expr
- func (field Field) Gt(value any) Expr
- func (e Field) GtCol(col Expr) Expr
- func (field Field) Gte(value any) Expr
- func (e Field) GteCol(col Expr) Expr
- func (field Field) Hour() Int
- func (field Field) IfNull(value any) Expr
- func (field Field) In(values ...any) Expr
- func (field Field) IntoColumns() Columns
- func (e Field) IsNotNull() Expr
- func (e Field) IsNull() Expr
- func (field Field) LeftShift(value any) Field
- func (e Field) Length() Int
- func (field Field) Like(value any) Expr
- func (field Field) Lt(value any) Expr
- func (e Field) LtCol(col Expr) Expr
- func (field Field) Lte(value any) Expr
- func (e Field) LteCol(col Expr) Expr
- func (e Field) Max() Float64
- func (field Field) MicroSecond() Int
- func (e Field) Min() Float64
- func (field Field) Minute() Int
- func (field Field) Mod(value any) Field
- func (field Field) Month() Int
- func (field Field) MonthName() String
- func (field Field) Mul(value any) Field
- func (e Field) MulCol(col Expr) Expr
- func (field Field) Neq(value any) Expr
- func (e Field) NeqCol(col Expr) Expr
- func (field Field) NotBetween(left any, right any) Expr
- func (field Field) NotIn(values ...any) Expr
- func (field Field) NotLike(value any) Expr
- func (field Field) NotRegxp(value string) Expr
- func (e Field) RawExpr() expression
- func (field Field) Regexp(value any) Expr
- func (field Field) Replace(from, to string) String
- func (field Field) RightShift(value any) Field
- func (field Field) Round(decimals int) Field
- func (field Field) Second() Int
- func (field Field) Sub(value any) Field
- func (e Field) SubCol(col Expr) Expr
- func (field Field) SubstringIndex(delim string, count int) String
- func (field Field) Sum() Field
- func (field Field) UnixTimestamp() Int64
- func (e Field) WithTable(table string) Expr
- func (field Field) Year() Int
- type Float
- func (field Float[T]) Add(value T) Float[T]
- func (field Float[T]) Between(left T, right T) Expr
- func (field Float[T]) Div(value T) Float[T]
- func (field Float[T]) Eq(value T) Expr
- func (field Float[T]) Floor() Int
- func (field Float[T]) FloorDiv(value T) Int
- func (field Float[T]) Gt(value T) Expr
- func (field Float[T]) Gte(value T) Expr
- func (field Float[T]) IfNull(value T) Expr
- func (field Float[T]) In(values ...T) Expr
- func (field Float[T]) IntoColumns() Columns
- func (field Float[T]) Like(value T) Expr
- func (field Float[T]) Lt(value T) Expr
- func (field Float[T]) Lte(value T) Expr
- func (field Float[T]) Mul(value T) Float[T]
- func (field Float[T]) Neq(value T) Expr
- func (field Float[T]) NotBetween(left T, right T) Expr
- func (field Float[T]) NotIn(values ...T) Expr
- func (field Float[T]) NotLike(value T) Expr
- func (field Float[T]) Round(decimals int) Float[T]
- func (field Float[T]) Sub(value T) Float[T]
- func (field Float[T]) Sum() Float[T]
- type Float32
- type Float64
- type From
- type Int
- type Int16
- type Int32
- type Int64
- type Int8
- type Integer
- func (field Integer[T]) Add(value T) Integer[T]
- func (field Integer[T]) Between(left T, right T) Expr
- func (field Integer[T]) BitAnd(value T) Integer[T]
- func (field Integer[T]) BitFlip() Integer[T]
- func (field Integer[T]) BitOr(value T) Integer[T]
- func (field Integer[T]) BitXor(value T) Integer[T]
- func (field Integer[T]) Div(value T) Integer[T]
- func (field Integer[T]) Eq(value T) Expr
- func (field Integer[T]) FloorDiv(value T) Integer[T]
- func (field Integer[T]) FromDays() Time
- func (field Integer[T]) FromUnixTime(format ...string) String
- func (field Integer[T]) Gt(value T) Expr
- func (field Integer[T]) Gte(value T) Expr
- func (field Integer[T]) IfNull(value T) Expr
- func (field Integer[T]) In(values ...T) Expr
- func (field Integer[T]) IntoColumns() Columns
- func (field Integer[T]) LeftShift(value T) Integer[T]
- func (field Integer[T]) Like(value T) Expr
- func (field Integer[T]) Lt(value T) Expr
- func (field Integer[T]) Lte(value T) Expr
- func (field Integer[T]) Mod(value T) Integer[T]
- func (field Integer[T]) Mul(value T) Integer[T]
- func (field Integer[T]) Neq(value T) Expr
- func (field Integer[T]) NotBetween(left T, right T) Expr
- func (field Integer[T]) NotIn(values ...T) Expr
- func (field Integer[T]) NotLike(value T) Expr
- func (field Integer[T]) RightShift(value T) Integer[T]
- func (field Integer[T]) Round(value int) Integer[T]
- func (field Integer[T]) Sub(value T) Integer[T]
- func (field Integer[T]) Sum() Integer[T]
- type Option
- type Raw
- type String
- func (field String) Between(left, right string) Expr
- func (field String) Concat(before, after string) String
- func (field String) Eq(value string) Expr
- func (field String) FindInSet(targetList string) Expr
- func (field String) FindInSetWith(target string) Expr
- func (field String) FuzzyLike(value 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) IntoColumns() Columns
- func (field String) LeftLike(value 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, 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) Replace(from, to string) String
- func (field String) SubstringIndex(delim string, count int) String
- type Time
- func (field Time) Add(value time.Duration) Time
- func (field Time) Between(left time.Time, right time.Time) Expr
- func (field Time) Date() Time
- func (field Time) DateDiff(expr2 time.Time) Int
- func (field Time) DateFormat(format 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) Gt(value time.Time) Expr
- func (field Time) Gte(value time.Time) Expr
- func (field Time) Hour() Int
- func (field Time) IfNull(value time.Time) Expr
- func (field Time) In(values ...time.Time) Expr
- func (field Time) IntoColumns() Columns
- 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) Second() Int
- func (field Time) Sub(value time.Duration) Time
- func (field Time) Sum() Time
- func (field Time) UnixTimestamp() Int64
- func (field Time) Year() Int
- type Uint
- type Uint16
- type Uint32
- type Uint64
- type Uint8
- type Value
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultPerPage 默认页大小 DefaultPerPage = int64(50) // DefaultPageSize 默认最大页大小 DefaultMaxPerPage = int64(500) )
var All = Star
var One = NewRaw("1")
One a symbol of "1"
var Star = NewAsterisk("")
Star/All a symbol of "*"
Functions ¶
func IntoExpression ¶
func IntoExpression(conds ...Expr) []clause.Expression
IntoExpression convert Expr to clause.Expression
func IntoIntegerSlice ¶ added in v0.0.6
func IntoIntegerSlice[T constraints.Integer, R constraints.Integer](values []T) []R
Types ¶
type Asterisk ¶
type Asterisk struct {
// contains filtered or unexported fields
}
Asterisk a type of xxx.*
func (Asterisk) BuildColumn ¶
func (e Asterisk) BuildColumn(stmt *gorm.Statement, opts ...BuildOption) string
func (Asterisk) BuildWithArgs ¶
func (Asterisk) ColumnName ¶
func (e Asterisk) ColumnName() string
func (Asterisk) Expression ¶
func (e Asterisk) Expression() clause.Expression
func (Asterisk) GroupConcat ¶
func (e Asterisk) GroupConcat() Expr
GroupConcat use GROUP_CONCAT(expr)
type Bool ¶
type Bool Field
Bool boolean type field
func (Bool) IntoColumns ¶
IntoColumns columns array with sub method
type BuildOption ¶
type BuildOption uint
BuildOption build option
const ( // WithTable build column with table WithTable BuildOption = iota // WithAll build column with table and alias(if have) WithAll // WithoutQuote build column without quote WithoutQuote )
type Bytes ¶
type Bytes Field
Bytes []byte type field
func (Bytes) FindInSetWith ¶
FindInSetWith FIND_IN_SET(input_string, field_name)
func (Bytes) FuzzyLike ¶
FuzzyLike use expr LIKE ?, ? contain prefix % and suffix % e.g. expr LIKE %value%
func (Bytes) IntoColumns ¶
IntoColumns columns array with sub method
func (Bytes) NotBetween ¶
NotBetween use NOT (expr BETWEEN ? AND ?)
func (Bytes) SubstringIndex ¶
SubstringIndex use SUBSTRING_INDEX(expr,?,?) https://dev.mysql.com/doc/refman/8.0/en/functions.html#function_substring-index
type Columns ¶
type Columns []Expr
Columns columns array
func (Columns) In ¶
IN return contains subQuery or value when len(columns) == 1, equal to columns[0] IN (subQuery/value) when len(columns) > 1, equal to (columns[0], columns[1], ...) IN (subQuery/value)
type Condition ¶
Condition alias func(*gorm.DB) *gorm.DB
func CrossJoinX ¶
CrossJoinX cross joins condition
func InnerJoinX ¶
InnerJoinX inner joins condition
func LockingUpdate ¶
func LockingUpdate() Condition
LockingUpdate specify the lock strength to UPDATE
func Pagination ¶
Pagination 分页器 分页索引: page >= 1 分页大小: perPage >= 1 && <= DefaultMaxPerPage
func RightJoinX ¶
RightJoinX right join condition
type Conditions ¶
type Conditions []Condition
Conditions Condition slice
func NewConditions ¶
func NewConditions(cs ...Condition) Conditions
NewConditions new condition instance.
func (Conditions) Append ¶ added in v0.0.2
func (c Conditions) Append(cs ...Condition) Conditions
Append more condition
func (Conditions) CrossJoin ¶
func (c Conditions) CrossJoin(tableName string, conds ...Expr) Conditions
CrossJoin cross joins condition
func (Conditions) CrossJoinX ¶
func (c Conditions) CrossJoinX(tableName, alias string, conds ...Expr) Conditions
CrossJoinX cross joins condition
func (Conditions) InnerJoin ¶
func (c Conditions) InnerJoin(tableName string, conds ...Expr) Conditions
InnerJoin inner joins condition
func (Conditions) InnerJoinX ¶
func (c Conditions) InnerJoinX(tableName, alias string, conds ...Expr) Conditions
InnerJoinX inner joins condition
func (Conditions) Join ¶
func (c Conditions) Join(tableName string, conds ...Expr) Conditions
Join same as InnerJoin.
func (Conditions) JoinX ¶
func (c Conditions) JoinX(tableName, alias string, conds ...Expr) Conditions
JoinX same as InnerJoinX.
func (Conditions) LeftJoin ¶
func (c Conditions) LeftJoin(tableName string, conds ...Expr) Conditions
LeftJoin left join condition
func (Conditions) LeftJoinX ¶
func (c Conditions) LeftJoinX(tableName, alias string, conds ...Expr) Conditions
LeftJoinX left join condition
func (Conditions) LockingShare ¶
func (c Conditions) LockingShare() Conditions
LockingShare specify the lock strength to SHARE
func (Conditions) LockingUpdate ¶
func (c Conditions) LockingUpdate() Conditions
LockingUpdate specify the lock strength to UPDATE
func (Conditions) Pagination ¶
func (c Conditions) Pagination(page, perPage int64, maxPages ...int64) Conditions
Pagination 分页器 分页索引: page >= 1 分页大小: perPage >= 1 && <= DefaultMaxPerPage
func (Conditions) RightJoin ¶
func (c Conditions) RightJoin(tableName string, conds ...Expr) Conditions
RightJoin right join condition
func (Conditions) RightJoinX ¶
func (c Conditions) RightJoinX(tableName, alias string, conds ...Expr) Conditions
RightJoinX right join condition
type Decimal ¶
func NewDecimal ¶
NewDecimal new decimal field
type Expr ¶
type Expr interface { clause.Expression As(alias string) Expr ColumnName() string Expression() clause.Expression RawExpr() expression BuildColumn(*gorm.Statement, ...BuildOption) string BuildWithArgs(*gorm.Statement) (query string, args []any) // col operate expression AddCol(col Expr) Expr SubCol(col Expr) Expr MulCol(col Expr) Expr DivCol(col Expr) Expr ConcatCol(cols ...Expr) Expr }
Expr a query expression about field
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
Field a standard field struct
func (Field) Add ¶
Add use value type:
time.Duration: use DATE_ADD(expr, INTERVAL ? MICROSECOND) other: use expr+?
func (Field) BuildColumn ¶
func (e Field) BuildColumn(stmt *gorm.Statement, opts ...BuildOption) string
func (Field) ColumnName ¶
func (e Field) ColumnName() string
func (Field) DateFormat ¶
DateFormat use DATE_FORMAT(date,format)
func (Field) Expression ¶
func (e Field) Expression() clause.Expression
func (Field) FindInSetWith ¶
FindInSetWith use FIND_IN_SET(?, expr)
func (Field) FromUnixTime ¶
FromUnixTime use FromUnixTime(unix_timestamp[, format])
func (Field) IntoColumns ¶
IntoColumns columns array with sub method
func (Field) MicroSecond ¶
MicroSecond use MICROSECOND(date) return the microsecond.
func (Field) NotBetween ¶
NotBetween use NOT (expr BETWEEN ? AND ?)
func (Field) Sub ¶
Sub use below value type:
time.Duration: use DATE_SUB(expr, INTERVAL ? MICROSECOND) other: use expr-?
func (Field) SubstringIndex ¶
SubstringIndex use SUBSTRING_INDEX(expr,?,?) https://dev.mysql.com/doc/refman/8.0/en/functions.html#function_substring-index
func (Field) UnixTimestamp ¶
UnixTimestamp use UnixTimestamp(date)
type Float ¶
type Float[T constraints.Float | ~string] Field
Float type field
func (Float[T]) IntoColumns ¶
IntoColumns columns array with sub method
func (Float[T]) NotBetween ¶
NotBetween use NOT (expr BETWEEN ? AND ?).
type Float32 ¶
func NewFloat32 ¶
NewFloat32 new float32 field
type Float64 ¶
func NewFloat64 ¶
NewFloat64 new float64 field
type Int64 ¶
func UnixTimestamp ¶
UnixTimestamp use UNIX_TIMESTAMP([date])
type Integer ¶
type Integer[T constraints.Integer] Field
Integer type field
func NewInteger ¶
func NewInteger[T constraints.Integer](table, column string, opts ...Option) Integer[T]
NewInt new Integer
func (Integer[T]) FromUnixTime ¶
FromUnixTime use FromUnixTime(unix_timestamp[, format])
func (Integer[T]) IntoColumns ¶
IntoColumns columns array with sub method
func (Integer[T]) NotBetween ¶
NotBetween use NOT (expr BETWEEN ? AND ?)
func (Integer[T]) RightShift ¶
RightShift use expr>>?
type String ¶
type String Field
String string type field
func FromUnixTime ¶
FromUnixTime use FROM_UNIXTIME(unix_timestamp[,format])
func (String) FindInSetWith ¶
FindInSetWith equal to FIND_IN_SET(input_string, field_name)
func (String) FuzzyLike ¶
FuzzyLike use expr LIKE ?, ? contain prefix % and suffix % e.g. expr LIKE %value%
func (String) IntoColumns ¶
IntoColumns columns array with sub method
func (String) NotBetween ¶
NotBetween use NOT (expr BETWEEN ? AND ?)
func (String) SubstringIndex ¶
SubstringIndex use SUBSTRING_INDEX(expr,?,?) https://dev.mysql.com/doc/refman/8.0/en/functions.html#function_substring-index
type Time ¶
type Time Field
Time time type field
func (Time) DateFormat ¶
DateFormat use DATE_FORMAT(date,format)
func (Time) IntoColumns ¶
IntoColumns columns array with sub method
func (Time) MicroSecond ¶
MicroSecond use MICROSECOND(date) return the microsecond.
func (Time) NotBetween ¶
NotBetween use NOT (expr BETWEEN ? AND ?)
func (Time) UnixTimestamp ¶
UnixTimestamp use UnixTimestamp(date)
Source Files ¶
- assist.go
- assist_join.go
- assist_paginate.go
- column_option.go
- expr.go
- expr_basic.go
- expr_col.go
- expr_general.go
- expr_keyword.go
- field.go
- field_asterisk.go
- field_bool.go
- field_bytes.go
- field_constant.go
- field_float.go
- field_float_generic.go
- field_integer.go
- field_integer_generic.go
- field_string.go
- field_time.go
- function.go
- function_time.go
- interface.go
- sub_query.go
- utils.go