Documentation
¶
Overview ¶
Package c defines function for building condition in query.
Index ¶
- type Condition
- func And(inner ...Condition) Condition
- func Eq(left, right interface{}) Condition
- func Fragment(expr I, values ...interface{}) Condition
- func Gt(left, right interface{}) Condition
- func Gte(left, right interface{}) Condition
- func In(col I, values ...interface{}) Condition
- func Like(col I, pattern string) Condition
- func Lt(left, right interface{}) Condition
- func Lte(left, right interface{}) Condition
- func Ne(left, right interface{}) Condition
- func Nil(col I) Condition
- func Nin(col I, values ...interface{}) Condition
- func Not(inner ...Condition) Condition
- func NotLike(col I, pattern string) Condition
- func NotNil(col I) Condition
- func Or(inner ...Condition) Condition
- type ConditionType
- type I
- type Join
- type Operand
- type Order
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition struct { Type ConditionType Left Operand Right Operand Inner []Condition }
Condition defines details of a coundition type.
func Eq ¶
func Eq(left, right interface{}) Condition
Eq compares that left value is equal to right value.
func Gt ¶
func Gt(left, right interface{}) Condition
Gt compares that left value is greater than to right value.
func Gte ¶
func Gte(left, right interface{}) Condition
Gte compares that left value is greater than or equal to right value.
func Lt ¶
func Lt(left, right interface{}) Condition
Lt compares that left value is less than to right value.
func Lte ¶
func Lte(left, right interface{}) Condition
Lte compares that left value is less than or equal to right value.
func Ne ¶
func Ne(left, right interface{}) Condition
Ne compares that left value is not equal to right value.
type ConditionType ¶
type ConditionType int
ConditionType defines enumeration of all supported condition types.
const ( // ConditionAnd is condition type for and operator. ConditionAnd ConditionType = iota // ConditionOr is condition type for or operator. ConditionOr // ConditionNot is condition type for not operator. ConditionNot // ConditionEq is condition type for equal comparison. ConditionEq // ConditionNe is condition type for not equal comparison. ConditionNe // ConditionLt is condition type for less than comparison. ConditionLt // ConditionLte is condition type for less than or equal comparison. ConditionLte // ConditionGt is condition type for greater than comparison. ConditionGt // ConditionGte is condition type for greter than or equal comparison. ConditionGte // ConditionNil is condition type for nil check. ConditionNil // ConditionNotNil is condition type for not nil check. ConditionNotNil // ConditionIn is condition type for inclusion comparison. ConditionIn // ConditionNin is condition type for not inclusion comparison. ConditionNin // ConditionLike is condition type for like comparison. ConditionLike // ConditionNotLike is condition type for not like comparison. ConditionNotLike // ConditionFragment is condition type for custom condition. ConditionFragment )
type Operand ¶
type Operand struct { Column I Values []interface{} }
Operand defines information about condition's operand.
Click to show internal directories.
Click to hide internal directories.