Documentation ¶
Index ¶
- func FormatValue(field string) string
- func String(s SqlInterface) string
- type Batch
- type Delete
- type Desc
- type Having
- func (w *Having) Args() []any
- func (w *Having) Between(field string, from any, to any) *Having
- func (w *Having) Eq(field string, value any) *Having
- func (w *Having) Ge(field string, value any) *Having
- func (w *Having) Gt(field string, value any) *Having
- func (w *Having) In(field string, value []any) *Having
- func (w *Having) IsNotNull(field string) *Having
- func (w *Having) IsNull(field string) *Having
- func (w *Having) Le(field string, value any) *Having
- func (w *Having) Like(field string, value any) *Having
- func (w *Having) Lt(field string, value any) *Having
- func (w *Having) Neq(field string, value any) *Having
- func (w *Having) NotIn(field string, value []any) *Having
- func (w *Having) OrPrepare() string
- func (w *Having) Prepare() string
- func (h *Having) Reset()
- func (w *Having) Statement(statement string) *Having
- func (w *Having) String() string
- type Insert
- type Join
- func NewJoin(table, alias, on string, columns ...string) *Join
- func NewJoinBy(ctx object.CtxInterface, table, alias, on string, columns ...string) *Join
- func NewJoinSub(sub *Select, alias, on string, columns ...string) *Join
- func NewJoinSubBy(ctx object.CtxInterface, sub *Select, alias, on string, columns ...string) *Join
- type Select
- func (s *Select) Args() []any
- func (s *Select) CaseWhen(caseWhens ...*meta.CaseWhen) *Select
- func (s *Select) ColMeta(columns ...*meta.Column) *Select
- func (s *Select) Columns(columns ...string) *Select
- func (s *Select) ForUpdate() *Select
- func (s *Select) GetLimit() int
- func (s *Select) GetOffset() int
- func (s *Select) Group(groups ...string) *Select
- func (s *Select) Having(having *Having) *Select
- func (s *Select) InnerJoin(table, alias, on string, columns ...string) *Select
- func (s *Select) InnerJoinSub(sub *Select, alias, on string, columns ...string) *Select
- func (s *Select) InnerJoinWith(join *Join) *Select
- func (s *Select) LeftJoin(table, alias, on string, columns ...string) *Select
- func (s *Select) LeftJoinSub(sub *Select, alias, on string, columns ...string) *Select
- func (s *Select) LeftJoinWith(join *Join) *Select
- func (s *Select) Limit(size int) *Select
- func (s *Select) Offset(offset int) *Select
- func (s *Select) OrWhere(where WhereInterface) *Select
- func (s *Select) Order(orders ...string) *Select
- func (s *Select) Prepare() string
- func (s *Select) Reset()
- func (s *Select) RightJoin(table, alias, on string, columns ...string) *Select
- func (s *Select) RightJoinSub(sub *Select, alias, on string, columns ...string) *Select
- func (s *Select) RightJoinWith(join *Join) *Select
- func (s *Select) SetColMeta(columns []*meta.Column) *Select
- func (s *Select) SetColumns(columns []string) *Select
- func (s *Select) String() string
- func (s *Select) Where(where WhereInterface) *Select
- func (s *Select) WhereByList(where meta.List) *Select
- func (s *Select) WhereByMap(where meta.Where) *Select
- type ShowTables
- type SqlInterface
- type StrInterface
- type Update
- func (u *Update) Args() []any
- func (u *Update) Prepare() string
- func (u *Update) Reset()
- func (u *Update) Set(field string, value any) *Update
- func (u *Update) String() string
- func (u *Update) Where(w WhereInterface) *Update
- func (u *Update) WhereByList(where meta.List) *Update
- func (u *Update) WhereByMap(where meta.Where) *Update
- type Where
- func (w *Where) Args() []any
- func (w *Where) Between(field string, from any, to any)
- func (w *Where) Eq(field string, value any)
- func (w *Where) Ge(field string, value any)
- func (w *Where) Gt(field string, value any)
- func (w *Where) In(field string, value []any)
- func (w *Where) IsNotNull(field string)
- func (w *Where) IsNull(field string)
- func (w *Where) Le(field string, value any)
- func (w *Where) Like(field string, value any)
- func (w *Where) Lt(field string, value any)
- func (w *Where) Neq(field string, value any)
- func (w *Where) NotIn(field string, value []any)
- func (w *Where) OrPrepare() string
- func (w *Where) Prepare() string
- func (w *Where) Reset()
- func (w *Where) Statement(statement string)
- func (w *Where) String() string
- type WhereInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatValue ¶
func String ¶
func String(s SqlInterface) string
Types ¶
type Batch ¶
func NewBatchBy ¶ added in v2.2.1
func NewBatchBy(ctx object.CtxInterface, table string) *Batch
type Delete ¶
func NewCkDelete ¶
func NewCkDeleteBy ¶ added in v2.2.1
func NewCkDeleteBy(ctx object.CtxInterface, table string) *Delete
func NewDeleteBy ¶ added in v2.2.1
func NewDeleteBy(ctx object.CtxInterface, table string) *Delete
func (*Delete) Where ¶
func (d *Delete) Where(w WhereInterface) *Delete
type Having ¶
func NewHavingBy ¶ added in v2.2.1
func NewHavingBy(ctx object.CtxInterface) *Having
type Insert ¶
func NewInsertBy ¶ added in v2.2.1
func NewInsertBy(ctx object.CtxInterface, table string) *Insert
func (*Insert) ParseValue ¶
type Join ¶ added in v2.0.3
func NewJoinBy ¶ added in v2.2.1
func NewJoinBy(ctx object.CtxInterface, table, alias, on string, columns ...string) *Join
func NewJoinSub ¶ added in v2.0.5
func NewJoinSubBy ¶ added in v2.2.1
type Select ¶
func NewSelectBy ¶ added in v2.2.1
func NewSelectBy(ctx object.CtxInterface, table, alias string) *Select
func NewSelectSub ¶ added in v2.0.5
func NewSelectSubBy ¶ added in v2.2.1
func NewSelectSubBy(ctx object.CtxInterface, sub *Select, alias string) *Select
func (*Select) InnerJoinSub ¶ added in v2.0.5
func (*Select) InnerJoinWith ¶ added in v2.0.5
func (*Select) LeftJoinSub ¶ added in v2.0.5
func (*Select) LeftJoinWith ¶ added in v2.0.5
func (*Select) OrWhere ¶
func (s *Select) OrWhere(where WhereInterface) *Select
func (*Select) RightJoinSub ¶ added in v2.0.5
func (*Select) RightJoinWith ¶ added in v2.0.5
func (*Select) SetColMeta ¶ added in v2.0.5
func (*Select) SetColumns ¶ added in v2.0.5
func (*Select) Where ¶
func (s *Select) Where(where WhereInterface) *Select
type ShowTables ¶ added in v2.0.2
func NewShowTables ¶ added in v2.0.2
func NewShowTables() *ShowTables
func NewShowTablesBy ¶ added in v2.2.1
func NewShowTablesBy(ctx object.CtxInterface) *ShowTables
func (*ShowTables) Args ¶ added in v2.0.2
func (d *ShowTables) Args() []any
func (*ShowTables) Prepare ¶ added in v2.0.2
func (d *ShowTables) Prepare() string
func (*ShowTables) String ¶ added in v2.0.2
func (d *ShowTables) String() string
type SqlInterface ¶
type SqlInterface interface { StrInterface Args() []any Prepare() string }
type StrInterface ¶ added in v2.1.9
type StrInterface interface {
String() string
}
type Update ¶
func NewCkUpdate ¶
func NewCkUpdateBy ¶ added in v2.2.1
func NewCkUpdateBy(ctx object.CtxInterface, table string) *Update
func NewUpdateBy ¶ added in v2.2.1
func NewUpdateBy(ctx object.CtxInterface, table string) *Update
func (*Update) Where ¶
func (u *Update) Where(w WhereInterface) *Update
type Where ¶
func NewWhereBy ¶ added in v2.2.1
func NewWhereBy(ctx object.CtxInterface) *Where
type WhereInterface ¶
type WhereInterface interface { SqlInterface Eq(field string, value any) Neq(field string, value any) Like(field string, value any) Between(field string, from, to any) Gt(field string, value any) Ge(field string, value any) Lt(field string, value any) Le(field string, value any) In(field string, value []any) NotIn(field string, value []any) IsNull(field string) IsNotNull(field string) Statement(statement string) OrPrepare() string }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.