Documentation
¶
Index ¶
- Variables
- type CTEChain
- func (c CTEChain[Q]) Apply(q Q)
- func (c CTEChain[Q]) As(q bob.Query) CTEChain[Q]
- func (c CTEChain[Q]) Cycle(set, using string, cols ...string) CTEChain[Q]
- func (c CTEChain[Q]) CycleValue(value, defaultVal any) CTEChain[Q]
- func (c CTEChain[Q]) Materialized() CTEChain[Q]
- func (c CTEChain[Q]) NotMaterialized() CTEChain[Q]
- func (c CTEChain[Q]) SearchBreadth(setCol string, searchCols ...string) CTEChain[Q]
- func (c CTEChain[Q]) SearchDepth(setCol string, searchCols ...string) CTEChain[Q]
- type CrossJoinChain
- type DeleteQuery
- type Distinct
- type Expression
- type FromChain
- type Function
- type Functions
- type InsertQuery
- type JoinChain
- func (j JoinChain[Q]) Apply(q Q)
- func (j JoinChain[Q]) As(alias string, columns ...string) JoinChain[Q]
- func (f JoinChain[Q]) Lateral() JoinChain[Q]
- func (j JoinChain[Q]) Natural() bob.Mod[Q]
- func (j JoinChain[Q]) On(on ...bob.Expression) bob.Mod[Q]
- func (j JoinChain[Q]) OnEQ(a, b bob.Expression) bob.Mod[Q]
- func (f JoinChain[Q]) Only() JoinChain[Q]
- func (j JoinChain[Q]) Using(using ...string) bob.Mod[Q]
- func (f JoinChain[Q]) WithOrdinality() JoinChain[Q]
- type Joinable
- type LockChain
- type OrderBy
- func (s OrderBy[Q]) Apply(q Q)
- func (o OrderBy[Q]) Asc() OrderBy[Q]
- func (o OrderBy[Q]) Collate(collationName string) OrderBy[Q]
- func (o OrderBy[Q]) Desc() OrderBy[Q]
- func (o OrderBy[Q]) NullsFirst() OrderBy[Q]
- func (o OrderBy[Q]) NullsLast() OrderBy[Q]
- func (o OrderBy[Q]) Using(operator string) OrderBy[Q]
- type OrderCombined
- type RowValue
- type SelectQuery
- type UpdateQuery
- type ValuesQuery
Constants ¶
This section is empty.
Variables ¶
var Dialect dialect
Functions ¶
This section is empty.
Types ¶
type CTEChain ¶
type CTEChain[Q interface{ AppendCTE(bob.Expression) }] func() clause.CTE
func With ¶
func With[Q interface{ AppendCTE(bob.Expression) }](name string, columns ...string) CTEChain[Q]
func (CTEChain[Q]) CycleValue ¶
func (CTEChain[Q]) Materialized ¶
func (CTEChain[Q]) NotMaterialized ¶
func (CTEChain[Q]) SearchBreadth ¶
type CrossJoinChain ¶
func CrossJoin ¶
func CrossJoin[Q Joinable](e any) CrossJoinChain[Q]
func (CrossJoinChain[Q]) Apply ¶
func (j CrossJoinChain[Q]) Apply(q Q)
type DeleteQuery ¶
type DeleteQuery struct {
clause.With
Only bool
Table clause.TableRef
clause.TableRef
clause.Where
clause.Returning
bob.Load
bob.EmbeddedHook
bob.ContextualModdable[*DeleteQuery]
}
Trying to represent the select query structure as documented in https://www.postgresql.org/docs/current/sql-delete.html
type Expression ¶
type Expression struct {
expr.Chain[Expression, Expression]
}
func NewExpression ¶
func NewExpression(exp bob.Expression) Expression
func (Expression) BetweenSymmetric ¶
func (x Expression) BetweenSymmetric(a, b bob.Expression) Expression
BETWEEN SYMMETRIC a AND b
func (Expression) New ¶
func (Expression) New(exp bob.Expression) Expression
func (Expression) NotBetweenSymmetric ¶
func (x Expression) NotBetweenSymmetric(a, b bob.Expression) Expression
NOT BETWEEN SYMMETRIC a AND b
type FromChain ¶
func (FromChain[Q]) WithOrdinality ¶
type Function ¶
type Function struct {
Distinct bool
WithinGroup bool
clause.OrderBy
Filter []any
Alias string // used when there should be an alias before the columns
Columns []columnDef
expr.Chain[Expression, Expression]
// contains filtered or unexported fields
}
func NewFunction ¶
func (*Function) AppendColumn ¶
type InsertQuery ¶
type InsertQuery struct {
clause.With
Overriding string
clause.TableRef
clause.Values
clause.Conflict
clause.Returning
bob.Load
bob.EmbeddedHook
bob.ContextualModdable[*InsertQuery]
}
Trying to represent the select query structure as documented in https://www.postgresql.org/docs/current/sql-insert.html
type JoinChain ¶
func (JoinChain[Q]) WithOrdinality ¶
type LockChain ¶
type LockChain[Q interface{ AppendLock(bob.Expression) }] func() clause.Lock
func (LockChain[Q]) SkipLocked ¶
type OrderBy ¶
type OrderBy[Q interface{ AppendOrder(bob.Expression) }] func() clause.OrderDef
func (OrderBy[Q]) NullsFirst ¶
type OrderCombined ¶
type OrderCombined OrderBy[*SelectQuery]
func (OrderCombined) Apply ¶
func (o OrderCombined) Apply(q *SelectQuery)
type RowValue ¶
type RowValue []bob.Expression
type SelectQuery ¶
type SelectQuery struct {
clause.With
clause.SelectList
Distinct
clause.TableRef
clause.Where
clause.GroupBy
clause.Having
clause.Windows
clause.Combines
clause.OrderBy
clause.Limit
clause.Offset
clause.Fetch
clause.Locks
bob.Load
bob.EmbeddedHook
bob.ContextualModdable[*SelectQuery]
CombinedOrder clause.OrderBy
CombinedLimit clause.Limit
CombinedFetch clause.Fetch
CombinedOffset clause.Offset
}
Trying to represent the select query structure as documented in https://www.postgresql.org/docs/current/sql-select.html
type UpdateQuery ¶
type UpdateQuery struct {
clause.With
Only bool
Table clause.TableRef
clause.Set
clause.TableRef
clause.Where
clause.Returning
bob.Load
bob.EmbeddedHook
bob.ContextualModdable[*UpdateQuery]
}
Trying to represent the select query structure as documented in https://www.postgresql.org/docs/current/sql-update.html
type ValuesQuery ¶
type ValuesQuery struct {
// rows of VALUES query
// each sub-slice is one set of values
RowVals []RowValue
clause.OrderBy
clause.Limit
clause.Offset
clause.Fetch
}
Trying to represent the values query structure as doumented in https://www.postgresql.org/docs/current/sql-values.html
func (*ValuesQuery) AppendValues ¶
func (v *ValuesQuery) AppendValues(vals ...bob.Expression)