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(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
- type Set
- type Table
- type Values
- type Where
- type WindowDef
- 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 OrderDef ¶
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) SetSelect ¶ added in v0.20.0
func (s *SelectList) SetSelect(columns ...any)
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 WindowDef ¶
type WindowDef struct { From string // an existing window name Frame // contains filtered or unexported fields }
func (*WindowDef) AddOrderBy ¶
func (*WindowDef) AddPartitionBy ¶
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.