Documentation ¶
Index ¶
- func Arg(vals ...any) bob.Expression
- func ArgGroup(vals ...any) bob.Expression
- func Not[T any, B builder[T]](exp any) T
- func OP(operator string, left, right any) bob.Expression
- func P(exp any) bob.Expression
- func Quote(aa ...string) bob.Expression
- func RawQuery(d bob.Dialect, q string, args ...any) bob.BaseQuery[Raw]
- func X[T any, B builder[T]](exp any, others ...any) T
- type Builder
- func (e Builder[T, B]) And(args ...any) T
- func (e Builder[T, B]) Arg(vals ...any) T
- func (e Builder[T, B]) ArgGroup(vals ...any) T
- func (e Builder[T, B]) Group(exps ...any) T
- func (e Builder[T, B]) Not(exp any) T
- func (e Builder[T, B]) Or(args ...any) T
- func (e Builder[T, B]) P(exp any) T
- func (e Builder[T, B]) Placeholder(n uint) T
- func (e Builder[T, B]) Quote(aa ...string) T
- func (e Builder[T, B]) Raw(query string, args ...any) T
- func (e Builder[T, B]) S(s string) T
- func (e Builder[T, B]) X(exp any, others ...any) T
- type Chain
- func (x Chain[T, B]) And(targets ...any) T
- func (x Chain[T, B]) As(alias string) bob.Expression
- func (x Chain[T, B]) Between(a, b any) T
- func (x Chain[T, B]) Concat(targets ...any) T
- func (x Chain[T, B]) EQ(target any) T
- func (x Chain[T, B]) GT(target any) T
- func (x Chain[T, B]) GTE(target any) T
- func (x Chain[T, B]) In(vals ...any) T
- func (x Chain[T, B]) IsDistinctFrom(exp any) T
- func (x Chain[T, B]) IsNotDistinctFrom(exp any) T
- func (x Chain[T, B]) IsNotNull() T
- func (x Chain[T, B]) IsNull() T
- func (x Chain[T, B]) LT(target any) T
- func (x Chain[T, B]) LTE(target any) T
- func (x Chain[T, B]) Minus(target any) T
- func (x Chain[T, B]) NE(target any) T
- func (x Chain[T, B]) NotBetween(a, b any) T
- func (x Chain[T, B]) NotIn(vals ...any) T
- func (x Chain[T, B]) Or(targets ...any) T
- func (x Chain[T, B]) WriteSQL(w io.Writer, d bob.Dialect, start int) ([]any, error)
- type Join
- type Raw
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Arg ¶ added in v0.3.1
func Arg(vals ...any) bob.Expression
func ArgGroup ¶ added in v0.15.0
func ArgGroup(vals ...any) bob.Expression
Like Arg, but wraps in parentheses
func OP ¶
func OP(operator string, left, right any) bob.Expression
Generic operator between a left and right val
func Quote ¶ added in v0.2.0
func Quote(aa ...string) bob.Expression
Types ¶
type Builder ¶
type Builder[T any, B builder[T]] struct{}
To be embedded in query mods T is the chain type, this allows dialects to have custom chain methods F is function type, so that the dialect can change where it accepted. E.g. it can be modified to work as a mod B has a New() method that is used to create a new instance of T
func (Builder[T, B]) ArgGroup ¶ added in v0.15.0
Comma separated list of arguments surrounded by parentheses
func (Builder[T, B]) Placeholder ¶
type Chain ¶
func (Chain[T, B]) As ¶
func (x Chain[T, B]) As(alias string) bob.Expression
As does not return a new chain. Should be used at the end of an expression useful for columns
func (Chain[T, B]) IsDistinctFrom ¶ added in v0.2.0
IS DISTINCT FROM
func (Chain[T, B]) IsNotDistinctFrom ¶ added in v0.2.0
IS NOT DISTINCT FROM
Click to show internal directories.
Click to hide internal directories.