Documentation ¶
Index ¶
- Constants
- Variables
- type CTE
- type CTECycle
- type CTESearch
- type Combine
- type Conflict
- type ConflictTarget
- type Fetch
- type For
- type Frame
- type From
- func (f *From) AppendIndexHint(i IndexHint)
- func (f *From) AppendJoin(j Join)
- func (f *From) AppendPartition(partitions ...string)
- func (f *From) SetIndexedBy(i *string)
- func (f *From) SetLateral(lateral bool)
- func (f *From) SetOnly(only bool)
- func (f *From) SetTable(table any)
- func (f *From) SetTableAlias(alias string, columns ...string)
- func (f *From) SetWithOrdinality(to bool)
- func (f From) WriteSQL(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error)
- type GroupBy
- type GroupingSet
- type Having
- type IWindow
- type IndexHint
- type Join
- type Limit
- type NamedWindow
- type Offset
- type OrderBy
- type OrderDef
- type Returning
- type SelectList
- func (s *SelectList) AppendPreloadSelect(columns ...any)
- func (s *SelectList) AppendSelect(columns ...any)
- func (s *SelectList) CountSelectCols() int
- func (s *SelectList) SetPreloadSelect(columns ...any)
- func (s *SelectList) SetSelect(columns ...any)
- func (s SelectList) WriteSQL(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error)
- type Set
- type Table
- type Value
- type Values
- type Where
- type Window
- type Windows
- type With
Constants ¶
View Source
const ( Union = "UNION" Intersect = "INTERSECT" Except = "EXCEPT" )
View Source
const ( SearchBreadth = "BREADTH" SearchDepth = "DEPTH" )
View Source
const ( LockStrengthUpdate = "UPDATE" LockStrengthNoKeyUpdate = "NO KEY UPDATE" )
View Source
const ( LockWaitNoWait = "NOWAIT" LockWaitSkipLocked = "SKIP LOCKED" )
View Source
const ( InnerJoin = "INNER JOIN" LeftJoin = "LEFT JOIN" RightJoin = "RIGHT JOIN" FullJoin = "FULL JOIN" CrossJoin = "CROSS JOIN" StraightJoin = "STRAIGHT_JOIN" )
Variables ¶
View Source
var ErrNoCombinationStrategy = errors.New("Combination strategy must be set")
View Source
var ErrNoLockStrength = errors.New("No lock strength specified")
Functions ¶
This section is empty.
Types ¶
type CTE ¶
type Combine ¶
func (*Combine) SetCombine ¶
type Conflict ¶
type Conflict struct { Do string // DO NOTHING | DO UPDATE Target ConflictTarget Set Where }
func (*Conflict) SetConflict ¶
type ConflictTarget ¶
type Frame ¶
type Frame struct { Defined bool // whether any of the parts was defined Mode string Start any End any // can be nil Exclusion string // can be empty }
func (*Frame) SetExclusion ¶
type From ¶ added in v0.2.0
type From struct { Table any // Aliases Alias string Columns []string // Dialect specific modifiers Only bool // Postgres Lateral bool // Postgres & MySQL WithOrdinality bool // Postgres IndexedBy *string // SQLite Partitions []string // MySQL IndexHints []IndexHint // MySQL // Joins Joins []Join }
func (*From) AppendIndexHint ¶ added in v0.2.0
func (*From) AppendJoin ¶ added in v0.2.0
func (*From) AppendPartition ¶ added in v0.2.0
func (*From) SetIndexedBy ¶ added in v0.2.0
func (*From) SetLateral ¶ added in v0.2.0
func (*From) SetTableAlias ¶ added in v0.2.0
func (*From) SetWithOrdinality ¶ added in v0.2.0
type GroupBy ¶
func (*GroupBy) AppendGroup ¶
func (*GroupBy) SetGroupByDistinct ¶
func (*GroupBy) SetGroupWith ¶
type GroupingSet ¶
type GroupingSet struct { Groups []bob.Expression Type string // GROUPING SET | CUBE | ROLLUP }
type IndexHint ¶
type Join ¶
type Limit ¶
type Limit struct { // Some DBs (e.g. SQite) can take an expression // It is up to the mods to enforce any extra conditions Count any }
type NamedWindow ¶
type Offset ¶
type Offset struct { // Some DBs (e.g. SQite) can take an expression // It is up to the mods to enforce any extra conditions Count any }
type OrderBy ¶
type OrderBy struct {
Expressions []OrderDef
}
func (*OrderBy) AppendOrder ¶
func (*OrderBy) SetOrderBy ¶ added in v0.27.0
type OrderDef ¶
type OrderDef struct { Expression any Direction string // ASC | DESC | USING operator Nulls string // FIRST | LAST Collation bob.Expression }
type Returning ¶
type Returning struct {
Expressions []any
}
func (*Returning) AppendReturning ¶
func (*Returning) HasReturning ¶ added in v0.22.0
type SelectList ¶ added in v0.7.0
type SelectList struct { Columns []any // necessary to be able to treat preloaders // like any other query Mod PreloadColumns []any }
func (*SelectList) AppendPreloadSelect ¶ added in v0.20.0
func (s *SelectList) AppendPreloadSelect(columns ...any)
func (*SelectList) AppendSelect ¶ added in v0.7.0
func (s *SelectList) AppendSelect(columns ...any)
func (*SelectList) CountSelectCols ¶ added in v0.20.0
func (s *SelectList) CountSelectCols() int
func (*SelectList) SetPreloadSelect ¶ added in v0.27.0
func (s *SelectList) SetPreloadSelect(columns ...any)
func (*SelectList) SetSelect ¶ added in v0.20.0
func (s *SelectList) SetSelect(columns ...any)
type Value ¶ added in v0.29.0
type Value []bob.Expression
type Values ¶
type Values struct { // Query takes the highest priority // If present, will attempt to insert from this query Query bob.Query // for multiple inserts // each sub-slice is one set of values Vals []Value }
func (*Values) AppendValues ¶
func (v *Values) AppendValues(vals ...bob.Expression)
type Window ¶ added in v0.27.0
type Window struct { From string // an existing window name Frame // contains filtered or unexported fields }
func (*Window) AddOrderBy ¶ added in v0.27.0
func (*Window) AddPartitionBy ¶ added in v0.27.0
type Windows ¶
type Windows struct {
Windows []NamedWindow
}
func (*Windows) AppendWindow ¶
func (wi *Windows) AppendWindow(w NamedWindow)
Click to show internal directories.
Click to hide internal directories.