Documentation
¶
Index ¶
- type AdditionalQueryOperand
- type AndClause
- type AnyOperand
- type ArrayOperand
- type BetweenOperand
- type BinaryOperand
- type Clause
- type ColumnDML
- func (f *ColumnDML[V, C]) ARRAYContainedBy(vals ...V) Clause[C]
- func (f *ColumnDML[V, C]) ARRAYContainedByRaw(sql string, args ...any) Clause[C]
- func (f *ColumnDML[V, C]) ARRAYContains(vals ...V) Clause[C]
- func (f *ColumnDML[V, C]) ARRAYContainsRaw(sql string, args ...any) Clause[C]
- func (f *ColumnDML[V, C]) ARRAYLengthEq(length int) Clause[C]
- func (f *ColumnDML[V, C]) ARRAYLengthGt(length int) Clause[C]
- func (f *ColumnDML[V, C]) ARRAYLengthLt(length int) Clause[C]
- func (f *ColumnDML[V, C]) ARRAYOverlap(vals ...V) Clause[C]
- func (f *ColumnDML[V, C]) ARRAYOverlapRaw(sql string, args ...any) Clause[C]
- func (f *ColumnDML[V, C]) And(clauses ...Clause[C]) Clause[C]
- func (f *ColumnDML[V, C]) Any(vals ...V) Clause[C]
- func (f *ColumnDML[V, C]) AnyOf(query types.Query) Clause[C]
- func (f *ColumnDML[V, C]) AnyRaw(sql string, args ...any) Clause[C]
- func (f *ColumnDML[V, C]) Between(lower, upper V) Clause[C]
- func (f *ColumnDML[V, C]) Eq(val V) Clause[C]
- func (f *ColumnDML[V, C]) EqOf(query types.Query) Clause[C]
- func (f *ColumnDML[V, C]) EqRaw(sql string, args ...any) Clause[C]
- func (f *ColumnDML[V, C]) ExistsOf(query types.Query) Clause[C]
- func (f *ColumnDML[V, C]) ExistsRaw(sql string, args ...any) Clause[C]
- func (f *ColumnDML[V, C]) Gt(val V) Clause[C]
- func (f *ColumnDML[V, C]) Gte(val V) Clause[C]
- func (f *ColumnDML[V, C]) ILike(pattern string) Clause[C]
- func (f *ColumnDML[V, C]) In(vals ...V) Clause[C]
- func (f *ColumnDML[V, C]) InOf(query types.Query) Clause[C]
- func (f *ColumnDML[V, C]) InRaw(sql string, args ...any) Clause[C]
- func (f *ColumnDML[V, C]) IsNotNull() Clause[C]
- func (f *ColumnDML[V, C]) IsNull() Clause[C]
- func (f *ColumnDML[V, C]) JSONContainedBy(jsonValue string) Clause[C]
- func (f *ColumnDML[V, C]) JSONContains(jsonValue string) Clause[C]
- func (f *ColumnDML[V, C]) JSONGetField(key string) *JsonFieldAccess[C]
- func (f *ColumnDML[V, C]) JSONGetFieldText(key string) *JsonFieldAccess[C]
- func (f *ColumnDML[V, C]) JSONGetPath(path ...string) *JsonFieldAccess[C]
- func (f *ColumnDML[V, C]) JSONGetPathText(path ...string) *JsonFieldAccess[C]
- func (f *ColumnDML[V, C]) JSONHasAllKeys(keys ...string) Clause[C]
- func (f *ColumnDML[V, C]) JSONHasAnyKey(keys ...string) Clause[C]
- func (f *ColumnDML[V, C]) JSONHasKey(key string) Clause[C]
- func (f *ColumnDML[V, C]) JSONIsNotNull() Clause[C]
- func (f *ColumnDML[V, C]) JSONIsNull() Clause[C]
- func (f *ColumnDML[V, C]) JSONJsonPathPredicate(path string) Clause[C]
- func (f *ColumnDML[V, C]) JSONJsonPathQuery(path string) Clause[C]
- func (f *ColumnDML[V, C]) JSONRaw(operator string, sql string, args ...any) Clause[C]
- func (f *ColumnDML[V, C]) Like(pattern string) Clause[C]
- func (f *ColumnDML[V, C]) Lt(val V) Clause[C]
- func (f *ColumnDML[V, C]) Lte(val V) Clause[C]
- func (f *ColumnDML[V, C]) Neq(val V) Clause[C]
- func (f *ColumnDML[V, C]) Not(notThisclause Clause[C]) Clause[C]
- func (f *ColumnDML[V, C]) NotAny(vals ...V) Clause[C]
- func (f *ColumnDML[V, C]) NotBetween(lower, upper V) Clause[C]
- func (f *ColumnDML[V, C]) NotILike(pattern string) Clause[C]
- func (f *ColumnDML[V, C]) NotIn(vals ...V) Clause[C]
- func (f *ColumnDML[V, C]) NotLike(pattern string) Clause[C]
- func (f *ColumnDML[V, C]) NotOf(query types.Query) Clause[C]
- func (f *ColumnDML[V, C]) NotRaw(operator string, sql string, args ...any) Clause[C]
- func (f *ColumnDML[V, C]) Of(query types.Query) Clause[C]
- func (f *ColumnDML[V, C]) Or(clauses ...Clause[C]) Clause[C]
- func (f *ColumnDML[V, C]) Raw(operator string, sql string, args ...any) Clause[C]
- type CommonOperand
- type CommonScalarOperand
- type EqOperand
- type ExistsClause
- type FieldClause
- type InOperand
- type IsNullOperand
- type JsonFieldAccess
- func (j *JsonFieldAccess[C]) Eq(val any) Clause[C]
- func (j *JsonFieldAccess[C]) Gt(val any) Clause[C]
- func (j *JsonFieldAccess[C]) In(vals ...any) Clause[C]
- func (j *JsonFieldAccess[C]) Like(pattern string) Clause[C]
- func (j *JsonFieldAccess[C]) Lt(val any) Clause[C]
- func (j *JsonFieldAccess[C]) Neq(val any) Clause[C]
- type JsonFieldClause
- type JsonOperand
- type JsonOperandColumn
- func (f *JsonOperandColumn[C]) ContainedBy(jsonValue string) Clause[C]
- func (f *JsonOperandColumn[C]) Contains(jsonValue string) Clause[C]
- func (f *JsonOperandColumn[C]) GetField(key string) *JsonFieldAccess[C]
- func (f *JsonOperandColumn[C]) GetFieldText(key string) *JsonFieldAccess[C]
- func (f *JsonOperandColumn[C]) GetPath(path ...string) *JsonFieldAccess[C]
- func (f *JsonOperandColumn[C]) GetPathText(path ...string) *JsonFieldAccess[C]
- func (f *JsonOperandColumn[C]) HasAllKeys(keys ...string) Clause[C]
- func (f *JsonOperandColumn[C]) HasAnyKey(keys ...string) Clause[C]
- func (f *JsonOperandColumn[C]) HasKey(key string) Clause[C]
- func (f *JsonOperandColumn[C]) IsNotNull() Clause[C]
- func (f *JsonOperandColumn[C]) IsNull() Clause[C]
- func (f *JsonOperandColumn[C]) JsonPathPredicate(path string) Clause[C]
- func (f *JsonOperandColumn[C]) JsonPathQuery(path string) Clause[C]
- func (f *JsonOperandColumn[C]) Raw(operator string, sql string, args ...any) Clause[C]
- type LikeOperand
- type LogicalOperand
- type NotClause
- type OrClause
- type ParamExprClause
- type RawExprClause
- type ScalarOperand
- type SliceExprClause
- type SubQueryExprClause
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalQueryOperand ¶
type AndClause ¶
type AndClause[C types.ColumnAlias] struct { Clauses []Clause[C] }
type AnyOperand ¶
type ArrayOperand ¶
type ArrayOperand[V any, C types.ColumnAlias] interface { ARRAYContains(...V) Clause[C] ARRAYContainedBy(...V) Clause[C] ARRAYOverlap(...V) Clause[C] ARRAYContainsRaw(string, ...any) Clause[C] ARRAYContainedByRaw(string, ...any) Clause[C] ARRAYOverlapRaw(string, ...any) Clause[C] ARRAYLengthEq(int) Clause[C] ARRAYLengthGt(int) Clause[C] ARRAYLengthLt(int) Clause[C] }
ArrayOperand defines operations specific to PostgreSQL array types
type BetweenOperand ¶
type BetweenOperand[V any, C types.ColumnAlias] interface { Between(V, V) Clause[C] NotBetween(V, V) Clause[C] }
type BinaryOperand ¶
type ColumnDML ¶
type ColumnDML[V any, C types.ColumnAlias] struct { // contains filtered or unexported fields }
func NewColumnDML ¶
func NewColumnDML[V any, C types.ColumnAlias](fa C) *ColumnDML[V, C]
func (*ColumnDML[V, C]) ARRAYContainedBy ¶
func (*ColumnDML[V, C]) ARRAYContainedByRaw ¶
func (*ColumnDML[V, C]) ARRAYContains ¶
func (*ColumnDML[V, C]) ARRAYContainsRaw ¶
func (*ColumnDML[V, C]) ARRAYLengthEq ¶
func (*ColumnDML[V, C]) ARRAYLengthGt ¶
func (*ColumnDML[V, C]) ARRAYLengthLt ¶
func (*ColumnDML[V, C]) ARRAYOverlap ¶
func (*ColumnDML[V, C]) ARRAYOverlapRaw ¶
func (*ColumnDML[V, C]) JSONContainedBy ¶
func (*ColumnDML[V, C]) JSONContains ¶
func (*ColumnDML[V, C]) JSONGetField ¶
func (f *ColumnDML[V, C]) JSONGetField(key string) *JsonFieldAccess[C]
func (*ColumnDML[V, C]) JSONGetFieldText ¶
func (f *ColumnDML[V, C]) JSONGetFieldText(key string) *JsonFieldAccess[C]
func (*ColumnDML[V, C]) JSONGetPath ¶
func (f *ColumnDML[V, C]) JSONGetPath(path ...string) *JsonFieldAccess[C]
func (*ColumnDML[V, C]) JSONGetPathText ¶
func (f *ColumnDML[V, C]) JSONGetPathText(path ...string) *JsonFieldAccess[C]
func (*ColumnDML[V, C]) JSONHasAllKeys ¶
func (*ColumnDML[V, C]) JSONHasAnyKey ¶
func (*ColumnDML[V, C]) JSONHasKey ¶
func (*ColumnDML[V, C]) JSONIsNotNull ¶
func (*ColumnDML[V, C]) JSONIsNull ¶
func (*ColumnDML[V, C]) JSONJsonPathPredicate ¶
func (*ColumnDML[V, C]) JSONJsonPathQuery ¶
func (*ColumnDML[V, C]) NotBetween ¶
type CommonOperand ¶
type CommonOperand[V any, C types.ColumnAlias] interface { EqOperand[V, C] LogicalOperand[C] AdditionalQueryOperand[C] }
type CommonScalarOperand ¶
type CommonScalarOperand[V any, C types.ColumnAlias] interface { CommonOperand[V, C] ScalarOperand[V, C] }
type ExistsClause ¶
type ExistsClause[C types.ColumnAlias] struct { SubQuery Clause[C] Negate bool }
func (*ExistsClause[C]) AddToBuilder ¶
type FieldClause ¶
type FieldClause[C types.ColumnAlias] struct { Field C Operator string Right types.Builder Negate bool }
func (*FieldClause[C]) AddToBuilder ¶
type IsNullOperand ¶
type IsNullOperand[C types.ColumnAlias] interface { IsNull() Clause[C] IsNotNull() Clause[C] }
type JsonFieldAccess ¶
type JsonFieldAccess[C types.ColumnAlias] struct { // contains filtered or unexported fields }
func (*JsonFieldAccess[C]) Eq ¶
func (j *JsonFieldAccess[C]) Eq(val any) Clause[C]
func (*JsonFieldAccess[C]) Gt ¶
func (j *JsonFieldAccess[C]) Gt(val any) Clause[C]
func (*JsonFieldAccess[C]) In ¶
func (j *JsonFieldAccess[C]) In(vals ...any) Clause[C]
func (*JsonFieldAccess[C]) Like ¶
func (j *JsonFieldAccess[C]) Like(pattern string) Clause[C]
func (*JsonFieldAccess[C]) Lt ¶
func (j *JsonFieldAccess[C]) Lt(val any) Clause[C]
func (*JsonFieldAccess[C]) Neq ¶
func (j *JsonFieldAccess[C]) Neq(val any) Clause[C]
type JsonFieldClause ¶
type JsonFieldClause[C types.ColumnAlias] struct { // contains filtered or unexported fields }
func (*JsonFieldClause[C]) AddToBuilder ¶
type JsonOperand ¶
type JsonOperand[C types.ColumnAlias] interface { JSONGetField(key string) *JsonFieldAccess[C] JSONGetFieldText(key string) *JsonFieldAccess[C] JSONGetPath(path ...string) *JsonFieldAccess[C] JSONGetPathText(path ...string) *JsonFieldAccess[C] JSONContains(jsonValue string) Clause[C] JSONContainedBy(jsonValue string) Clause[C] JSONHasKey(key string) Clause[C] JSONHasAnyKey(keys ...string) Clause[C] JSONHasAllKeys(keys ...string) Clause[C] JSONJsonPathQuery(path string) Clause[C] JSONJsonPathPredicate(path string) Clause[C] JSONIsNull() Clause[C] JSONIsNotNull() Clause[C] JSONRaw(operator string, sql string, args ...any) Clause[C] }
JsonOperand defines operations specific to PostgreSQL JSON/JSONB types
type JsonOperandColumn ¶
type JsonOperandColumn[C types.ColumnAlias] struct { // contains filtered or unexported fields }
JsonOperandColumn provides PostgreSQL JSON/JSONB operations
func NewJsonColumn ¶
func NewJsonColumn[C types.ColumnAlias](fa C) *JsonOperandColumn[C]
func (*JsonOperandColumn[C]) ContainedBy ¶
func (f *JsonOperandColumn[C]) ContainedBy(jsonValue string) Clause[C]
ContainedBy (<@) - JSON is contained by another JSON
func (*JsonOperandColumn[C]) Contains ¶
func (f *JsonOperandColumn[C]) Contains(jsonValue string) Clause[C]
Contains (@>) - JSON contains another JSON
func (*JsonOperandColumn[C]) GetField ¶
func (f *JsonOperandColumn[C]) GetField(key string) *JsonFieldAccess[C]
GetField (->) - get JSON object field
func (*JsonOperandColumn[C]) GetFieldText ¶
func (f *JsonOperandColumn[C]) GetFieldText(key string) *JsonFieldAccess[C]
GetFieldText (->>) - get JSON field as text
func (*JsonOperandColumn[C]) GetPath ¶
func (f *JsonOperandColumn[C]) GetPath(path ...string) *JsonFieldAccess[C]
GetPath (#>) - get nested JSON object
func (*JsonOperandColumn[C]) GetPathText ¶
func (f *JsonOperandColumn[C]) GetPathText(path ...string) *JsonFieldAccess[C]
GetPathText (#>>) - get nested JSON object as text
func (*JsonOperandColumn[C]) HasAllKeys ¶
func (f *JsonOperandColumn[C]) HasAllKeys(keys ...string) Clause[C]
HasAllKeys (?&) - JSON has all of the keys
func (*JsonOperandColumn[C]) HasAnyKey ¶
func (f *JsonOperandColumn[C]) HasAnyKey(keys ...string) Clause[C]
HasAnyKey (?|) - JSON has any of the keys
func (*JsonOperandColumn[C]) HasKey ¶
func (f *JsonOperandColumn[C]) HasKey(key string) Clause[C]
HasKey (?) - JSON has key
func (*JsonOperandColumn[C]) IsNotNull ¶
func (f *JsonOperandColumn[C]) IsNotNull() Clause[C]
IsNotNull checks if JSON is not null
func (*JsonOperandColumn[C]) IsNull ¶
func (f *JsonOperandColumn[C]) IsNull() Clause[C]
IsNull checks if JSON is null
func (*JsonOperandColumn[C]) JsonPathPredicate ¶
func (f *JsonOperandColumn[C]) JsonPathPredicate(path string) Clause[C]
JsonPathPredicate (@@) - JSONPath predicate
func (*JsonOperandColumn[C]) JsonPathQuery ¶
func (f *JsonOperandColumn[C]) JsonPathQuery(path string) Clause[C]
JsonPathQuery (@?) - JSONPath query
type LikeOperand ¶
type LogicalOperand ¶
type NotClause ¶
type NotClause[C types.ColumnAlias] struct { Inner Clause[C] }
type OrClause ¶
type OrClause[C types.ColumnAlias] struct { Clauses []Clause[C] }
type ParamExprClause ¶
type ParamExprClause[C types.ColumnAlias] struct { Value any LikeWrapp bool }
func (*ParamExprClause[C]) AddToBuilder ¶
type RawExprClause ¶
type RawExprClause[C types.ColumnAlias] struct { SQL string Args []any }
func (*RawExprClause[C]) AddToBuilder ¶
type ScalarOperand ¶
type ScalarOperand[V any, C types.ColumnAlias] interface { BinaryOperand[V, C] AnyOperand[V, C] InOperand[V, C] BetweenOperand[V, C] }
type SliceExprClause ¶
type SliceExprClause[C types.ColumnAlias] struct { Values any // slice }
func (*SliceExprClause[C]) AddToBuilder ¶
type SubQueryExprClause ¶
type SubQueryExprClause[C types.ColumnAlias] struct { Query types.Query }