Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrOrBeforeAnyConditions = errors.New(".Or() before any condition not supported, add any condition before .Or()") ErrNotOpenBracket = errors.New(".Not().OpenBracket() not supported") ErrCloseBracketWithoutOpen = errors.New("close bracket without open") ErrInvalidBracketBalance = errors.New("invalid bracket balance: has not closed bracket") )
Functions ¶
This section is empty.
Types ¶
type BaseQueryBuilder ¶
type BaseQueryBuilder interface {
Builder
MakeCopy() BaseQueryBuilder
Limit(limitItems int) BaseQueryBuilder
Offset(startOffset int) BaseQueryBuilder
Not() BaseQueryBuilder
Or() BaseQueryBuilder
OpenBracket() BaseQueryBuilder
CloseBracket() BaseQueryBuilder
AddWhere(cmp where.FieldComparator) BaseQueryBuilder
Where(getter *record.InterfaceGetter, condition where.ComparatorType, values ...interface{}) BaseQueryBuilder
WhereInt(getter *record.IntGetter, condition where.ComparatorType, values ...int) BaseQueryBuilder
WhereInt32(getter *record.Int32Getter, condition where.ComparatorType, values ...int32) BaseQueryBuilder
WhereInt64(getter *record.Int64Getter, condition where.ComparatorType, values ...int64) BaseQueryBuilder
WhereString(getter *record.StringGetter, condition where.ComparatorType, values ...string) BaseQueryBuilder
WhereStringRegexp(getter *record.StringGetter, value *regexp.Regexp) BaseQueryBuilder
WhereBool(getter *record.BoolGetter, condition where.ComparatorType, values ...bool) BaseQueryBuilder
WhereEnum8(getter *record.Enum8Getter, condition where.ComparatorType, values ...record.Enum8) BaseQueryBuilder
WhereEnum16(getter *record.Enum16Getter, condition where.ComparatorType, values ...record.Enum16) BaseQueryBuilder
WhereMap(getter *record.MapGetter, condition where.ComparatorType, values ...interface{}) BaseQueryBuilder
WhereSet(getter *record.SetGetter, condition where.ComparatorType, values ...interface{}) BaseQueryBuilder
Sort(by sort.By) BaseQueryBuilder
// OnIteration registers a callback to be called for each record before sorting and applying offset/limits
// but after applying WHERE conditions
OnIteration(cb func(item record.Record)) BaseQueryBuilder
}
BaseQueryBuilder is a helper for build Query
func NewBuilder ¶
func NewBuilder() BaseQueryBuilder
Click to show internal directories.
Click to hide internal directories.