Documentation
¶
Overview ¶
Package fragment owns authored SQL predicate fragments and their ordered invocation bindings. SQL templates and predicate templates share this owner.
Index ¶
- func Dialect(ctx context.Context) *info.Dialect
- func WithDialect(ctx context.Context, dialect *info.Dialect) context.Context
- type Bindings
- type Context
- func (c *Context) AppendBinding(value any) (string, error)
- func (c *Context) CompositeIn(alias string, rows any) (string, error)
- func (c *Context) Contains(column string, value any) (string, error)
- func (c *Context) Expression(expression string, value any) (string, error)
- func (c *Context) In(column string, value any) (string, error)
- func (c *Context) Like(column string, value any) (string, error)
- func (c *Context) NotContains(column string, value any) (string, error)
- func (c *Context) NotIn(column string, value any) (string, error)
- func (c *Context) NotLike(column string, value any) (string, error)
- func (c *Context) WithDialect(dialect *info.Dialect) *Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) CompositeIn ¶
CompositeIn renders a fixed tuple predicate from typed key records. SQLX owns column mapping and dialect syntax; all mapped fields participate even when their values are zero, false or null. Callers supply a key projection, not arbitrary mutable entity fields. Empty input is a no-match predicate.
func (*Context) Expression ¶
Expression follows authored Datly semantics: an empty string omits the expression, while zero numbers, false and NULL remain actual bound values.
func (*Context) NotContains ¶
Click to show internal directories.
Click to hide internal directories.