Documentation
¶
Index ¶
- Constants
- Variables
- type CTE
- type CTECycle
- type CTESearch
- type Combine
- type Conflict
- type ConflictTarget
- type Fetch
- type For
- type Frame
- type FromItem
- type FromItems
- 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 Select
- 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 ( ErrNoFrameMode = errors.New("No frame mode specified") ErrNoFrameStart = errors.New("No frame start specified") )
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 ¶
func (*Frame) SetExclusion ¶
type FromItem ¶
type FromItem 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 (*FromItem) AppendIndexHint ¶
func (*FromItem) AppendJoin ¶
func (*FromItem) AppendPartition ¶
func (*FromItem) SetTableAlias ¶
type GroupBy ¶
func (*GroupBy) AppendGroup ¶
func (*GroupBy) SetGroupByDistinct ¶
func (*GroupBy) SetGroupWith ¶
type GroupingSet ¶
type GroupingSet struct {
Groups []query.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 Select ¶
func (*Select) AppendSelect ¶
type Values ¶
type Values struct {
// Query takes the highest priority
// If present, will attempt to insert from this query
Query query.Query
// for multiple inserts
// each sub-slice is one set of values
Vals []value
}
func (*Values) AppendValues ¶
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.