Documentation ¶
Index ¶
- type AssignmentExpression
- type ColumnListExpression
- type ConditionalExpression
- type Connector
- type DirectListExpression
- type Expression
- func (e Expression) AddParams(params map[string]any)
- func (e Expression) AddSql(sql string)
- func (e Expression) Clean()
- func (e Expression) Copy() Expression
- func (e Expression) IsEmpty() bool
- func (e Expression) IsNotEmpty() bool
- func (e Expression) Params() map[string]any
- func (e Expression) String() string
- type JoinExpression
- type ListExpression
- type ReversedListExpression
- type ValueListExpression
- type WithExpression
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssignmentExpression ¶
type AssignmentExpression struct {
Expression
}
func EmptyAssignmentExp ¶
func EmptyAssignmentExp() AssignmentExpression
func (AssignmentExpression) Append ¶
func (e AssignmentExpression) Append(column any, args ...any)
func (AssignmentExpression) Copy ¶
func (e AssignmentExpression) Copy() AssignmentExpression
type ColumnListExpression ¶
type ColumnListExpression struct {
ListExpression
}
func EmptyColumnListExp ¶
func EmptyColumnListExp() ColumnListExpression
func NewColumnListExp ¶
func NewColumnListExp(column any, args ...any) ColumnListExpression
func (ColumnListExpression) Append ¶
func (e ColumnListExpression) Append(column any, args ...any)
Append adds column with its alias to the expression:
- Append(column any)
- Append(column any, alias any)
func (ColumnListExpression) Copy ¶
func (e ColumnListExpression) Copy() ColumnListExpression
type ConditionalExpression ¶
type ConditionalExpression struct {
Expression
}
func EmptyCondExp ¶
func EmptyCondExp() ConditionalExpression
func NewCondExp ¶
func NewCondExp(args ...any) ConditionalExpression
func (ConditionalExpression) AndWhere ¶
func (e ConditionalExpression) AndWhere(args ...any) ConditionalExpression
AndWhere add "AND" condition to the expression:
- AndWhere(condition string)
- AndWhere(condition ConditionalExpression)
- AndWhere(column string, operator string, value any)
- AndWhere(operand any, operator string, value any)
- AndWhere(operator string, operand any)
func (ConditionalExpression) Copy ¶
func (e ConditionalExpression) Copy() ConditionalExpression
func (ConditionalExpression) OrWhere ¶
func (e ConditionalExpression) OrWhere(args ...any) ConditionalExpression
OrWhere add "OR" condition to the expression:
- OrWhere(condition string)
- OrWhere(condition ConditionalExpression)
- OrWhere(column string, operator string, value any)
- OrWhere(operand any, operator string, value any)
- OrWhere(operator string, operand any)
func (ConditionalExpression) Where ¶
func (e ConditionalExpression) Where(args ...any) ConditionalExpression
Where add "OR" or "AND" condition to the expression:
- Where(condition string)
- Where(condition ConditionalExpression)
- Where(column string, operator string, value any)
- Where(operand any, operator string, value any)
- Where(operator string, operand any)
type DirectListExpression ¶
type DirectListExpression struct {
ListExpression
}
func EmptyDirectListExp ¶
func EmptyDirectListExp() DirectListExpression
func (DirectListExpression) Append ¶
func (e DirectListExpression) Append(name any, args ...any)
func (DirectListExpression) Copy ¶
func (e DirectListExpression) Copy() DirectListExpression
type Expression ¶
type Expression struct {
// contains filtered or unexported fields
}
func EmptyExp ¶
func EmptyExp() Expression
func NewExp ¶
func NewExp(sql string) Expression
func NewExpWithParams ¶
func NewExpWithParams(sql string, params map[string]any) Expression
func (Expression) AddParams ¶
func (e Expression) AddParams(params map[string]any)
func (Expression) AddSql ¶
func (e Expression) AddSql(sql string)
func (Expression) Clean ¶
func (e Expression) Clean()
func (Expression) Copy ¶
func (e Expression) Copy() Expression
func (Expression) IsEmpty ¶
func (e Expression) IsEmpty() bool
func (Expression) IsNotEmpty ¶
func (e Expression) IsNotEmpty() bool
func (Expression) Params ¶
func (e Expression) Params() map[string]any
func (Expression) String ¶
func (e Expression) String() string
type JoinExpression ¶
type JoinExpression struct {
Expression
}
func EmptyJoinExp ¶
func EmptyJoinExp() JoinExpression
func (JoinExpression) Append ¶
func (e JoinExpression) Append(joinType string, table any, args ...any)
func (JoinExpression) Copy ¶
func (e JoinExpression) Copy() JoinExpression
type ListExpression ¶
type ListExpression struct { Expression // contains filtered or unexported fields }
func EmptyListExp ¶
func EmptyListExp(reverseOrder bool) ListExpression
func (ListExpression) AppendName ¶
func (e ListExpression) AppendName(name any, alias any)
func (ListExpression) Copy ¶
func (e ListExpression) Copy() ListExpression
type ReversedListExpression ¶
type ReversedListExpression struct {
ListExpression
}
func EmptyReversedListExp ¶
func EmptyReversedListExp() ReversedListExpression
func (ReversedListExpression) Append ¶
func (e ReversedListExpression) Append(alias any, args ...any)
func (ReversedListExpression) Copy ¶
func (e ReversedListExpression) Copy() ReversedListExpression
type ValueListExpression ¶
type ValueListExpression struct {
Expression
}
func EmptyValueListExp ¶
func EmptyValueListExp() ValueListExpression
func NewValueListExp ¶
func NewValueListExp(values any) ValueListExpression
func (ValueListExpression) Append ¶
func (e ValueListExpression) Append(values any)
func (ValueListExpression) Copy ¶
func (e ValueListExpression) Copy() ValueListExpression
type WithExpression ¶
type WithExpression struct {
Expression
}
func EmptyWithExp ¶
func EmptyWithExp() WithExpression
func (WithExpression) Append ¶
func (e WithExpression) Append(recursive bool, query any, args ...any)
func (WithExpression) Copy ¶
func (e WithExpression) Copy() WithExpression
Click to show internal directories.
Click to hide internal directories.