Documentation
¶
Index ¶
- Constants
- Variables
- func Fn(fn, alias string, params ...interface{}) *fcolumn
- func From(tableName string, args ...interface{}) *sqlBuilder
- func RegisterSymbol(operater string, obj IOperater)
- func SField(tableAlias, field, fieldAlias string) *scolumn
- type BetweenOp
- type Condition
- type EndWithOp
- type EqualOp
- type FiveArgs
- type FourArgs
- type GroupWhere
- type GtOp
- type IArgser
- type IOperater
- type InOp
- type IsEmptyOp
- type IsNullOp
- type LikeOp
- type LtOp
- type OneArgs
- type StartWithOp
- type ThreeArgs
- type TwoArgs
- type Where
Constants ¶
View Source
const ( LIKE = "like" NLIKE = "not like" START_WITH = "start with" NSTART_WITH = "not start with" END_WITH = "end with" NEND_WITH = "not end with" IN = "in" NIN = "not in" BETWEEN = "between" NBETWEEN = "not between" EQUAL = "=" NEQUAL = "!=" GT = ">" LT = "<" GTE = ">=" LTE = "<=" IS_NULL = "is null" IS_NOT_NULL = "is not null" IS_EMPTY = "is empty" IS_NOT_EMPTY = "is not empty" )
Variables ¶
View Source
var ArgsMap map[int]IArgser
View Source
var SymbolMap map[string]IOperater
Functions ¶
func From ¶
func From(tableName string, args ...interface{}) *sqlBuilder
From 用于创建一个 sqlBuilder 实例,并返回该实例的指针。 参数 tableName 表示表名。 返回值为 *sqlBuilder 指针,指向新创建的 sqlBuilder 实例。
func RegisterSymbol ¶
Types ¶
type Condition ¶
type Condition struct {
// 字段
Field string
// 条件
Condition string
// 值
Value interface{}
// 表
TableName string
// 关系
Relation string
}
条件结构体
type FiveArgs ¶
type FiveArgs struct {
}
func (*FiveArgs) ParseArgs ¶
func (r *FiveArgs) ParseArgs(relation string, args ...interface{}) []GroupWhere
type FourArgs ¶
type FourArgs struct {
}
func (*FourArgs) ParseArgs ¶
func (r *FourArgs) ParseArgs(relation string, args ...interface{}) []GroupWhere
type GroupWhere ¶
type IArgser ¶
type IArgser interface {
ParseArgs(relation string, args ...interface{}) []GroupWhere
}
type OneArgs ¶
type OneArgs struct {
}
func (*OneArgs) ParseArgs ¶
func (r *OneArgs) ParseArgs(relation string, args ...interface{}) []GroupWhere
type StartWithOp ¶
type StartWithOp struct {
Symbol string
}
type ThreeArgs ¶
type ThreeArgs struct {
}
func (*ThreeArgs) ParseArgs ¶
func (r *ThreeArgs) ParseArgs(relation string, args ...interface{}) []GroupWhere
type TwoArgs ¶
type TwoArgs struct {
}
func (*TwoArgs) ParseArgs ¶
func (r *TwoArgs) ParseArgs(relation string, args ...interface{}) []GroupWhere
type Where ¶
type Where struct {
// contains filtered or unexported fields
}
func (*Where) SetGroupWhere ¶
func (r *Where) SetGroupWhere(groupWhere []GroupWhere)
Click to show internal directories.
Click to hide internal directories.