Documentation ¶
Index ¶
- Variables
- type AsAliasExpr
- type AtLeastOne
- type BetweenAndExpr
- type BinaryExpr
- type BinaryOperator
- type BindParameter
- type BlobLiteral
- type CaseWhenExpr
- type CastAsExpr
- type Column
- type ColumnAliasExpr
- type ColumnExpr
- type ColumnList
- type CommonTableExpr
- type CompoundOperator
- type CompoundSelect
- type CompoundSelectStmt
- type ConflictTarget
- type DataFromStmt
- type DeleteStmt
- type DeleteStmtLimited
- type DistinctFromExpr
- type ElseExpr
- type Empty
- type EscapeExpr
- type ExistsExpr
- type Expr
- type ExprList
- type FactoredSelectStmt
- type FilterClause
- type FrameSpec
- type FrameSpecBUEC
- type FrameSpecBetweenAnd
- type FrameSpecExclude
- type FrameSpecRRG
- type FromExpr
- type FuncArgs
- type FuncExpr
- type GRMExpr
- type InExpr
- type IndexExpr
- type IndexedColumn
- type InsertExpr
- type InsertStmt
- type Join
- type JoinClause
- type JoinConstraint
- type JoinOp
- type JoinOp0
- type JoinOp1
- type JoinOp2
- type JoinOperator
- type LRFOp
- type LikeExpr
- type LikeOrGRMExpr
- type LimitClause
- type LiteralValue
- type NotExistsExpr
- type NullExpr
- type NumericLiteral
- type Order
- type OrderByClause
- type OrderingTerm
- type OverClause
- type Pair
- type QualifiedTable
- type RaiseFunc
- type RaiseFuncExpr
- type ReplaceOrInsertExpr
- type ResultColumn
- type ResultColumnList
- type ReturningClause
- type ReturningExpr
- type SelectCore
- type SelectExpr
- type SelectStmt
- type SelectStmtExpr
- type SetExpr
- type SignedNumber
- type SimpleSelectStmt
- type StringLiteral
- type Table
- type TableExpr
- type TableFunc
- type TableFuncExpr
- type TableOrSubquery
- type TypeName
- type UnaryExpr
- type UnaryOperator
- type UpdateSetExpr
- type UpdateStmt
- type UpdateStmtLimited
- type UpsertClause
- type UpsertExpr
- type Values
- type WhenThenExpr
- type WindowDefn
- type WindowExpr
- type WithCommonTableExpr
- type WriteFailOpt
Constants ¶
This section is empty.
Variables ¶
View Source
var NoEmpty = &Empty{}
Functions ¶
This section is empty.
Types ¶
type AsAliasExpr ¶
type AtLeastOne ¶
type AtLeastOne[T any] struct { First T Remain []T }
type BinaryExpr ¶
type BinaryExpr struct { LExpr Expr Operator BinaryOperator RExpr Expr }
type BinaryOperator ¶
type BinaryOperator string
type BindParameter ¶
type BindParameter struct { }
type BlobLiteral ¶
type BlobLiteral struct { }
type CaseWhenExpr ¶
type CaseWhenExpr struct { Expr *Expr WhenThen AtLeastOne[WhenThenExpr] Else *ElseExpr }
type CastAsExpr ¶
type ColumnAliasExpr ¶
type ColumnExpr ¶
type ColumnList ¶
type ColumnList AtLeastOne[string]
type CommonTableExpr ¶
type CommonTableExpr struct { Table string Column []string Materialized *struct { Not *Empty } SelectStmt SelectStmt }
func (CommonTableExpr) Build ¶
func (b CommonTableExpr) Build(w io.Writer)
type CompoundOperator ¶
type CompoundSelect ¶
type CompoundSelect struct { Operator CompoundOperator Select SelectCore }
type CompoundSelectStmt ¶
type CompoundSelectStmt struct { SimpleSelectStmt Compound AtLeastOne[CompoundSelect] }
type ConflictTarget ¶
type ConflictTarget struct { Column *AtLeastOne[IndexedColumn] Where *Expr }
type DataFromStmt ¶
type DataFromStmt struct { Values *Values Select *SelectStmt Upsert *UpsertClause Default *Empty Returning *ReturningClause }
type DeleteStmt ¶
type DeleteStmt struct { With *WithCommonTableExpr Table QualifiedTable Where *Expr Returning *ReturningClause Limit *DeleteStmtLimited }
type DeleteStmtLimited ¶
type DeleteStmtLimited struct { Delete DeleteStmt OrderBy *OrderByClause Limit *LimitClause }
type DistinctFromExpr ¶
type EscapeExpr ¶
type EscapeExpr struct {
Expr Expr
}
type ExistsExpr ¶
type ExistsExpr struct { Exists *NotExistsExpr SelectStmt SelectStmt }
type Expr ¶
type Expr interface { kinternal.WriteBuilder }
type ExprList ¶
type ExprList AtLeastOne[Expr]
type FactoredSelectStmt ¶
type FactoredSelectStmt struct { SimpleSelectStmt Compound []CompoundSelect }
type FilterClause ¶
type FilterClause struct {
Where Expr
}
type FrameSpec ¶
type FrameSpec struct { RRG FrameSpecRRG BUEC FrameSpecBUEC Exclude *FrameSpecExclude }
type FrameSpecBUEC ¶
type FrameSpecBUEC struct { BetweenAnd *FrameSpecBetweenAnd UnboundedPreceding *Empty ExprPreceding *Expr CurrentRow *Empty }
type FrameSpecBetweenAnd ¶
type FrameSpecExclude ¶
type FrameSpecRRG ¶
type FromExpr ¶
type FromExpr struct { TableOrSubquery *AtLeastOne[TableOrSubquery] Join *JoinClause }
type FuncArgs ¶
type FuncArgs struct { Distinct *Empty Expr *ExprList OrderBy *OrderByClause Star *Empty }
type FuncExpr ¶
type FuncExpr struct { Name string Args FuncArgs FilterClause *FilterClause OverClause *OverClause }
type InExpr ¶
type InExpr struct { Expr Expr Not *Empty SelectStmt *SelectStmtExpr Schema *string TableExpr TableExpr }
type IndexedColumn ¶
type IndexedColumn struct { Column ColumnExpr Collate *string Order *Order }
type InsertExpr ¶
type InsertExpr struct {
Opt *WriteFailOpt
}
type InsertStmt ¶
type InsertStmt struct { With *WithCommonTableExpr Write ReplaceOrInsertExpr Table Table As *AsAliasExpr Column ColumnList Data DataFromStmt }
type Join ¶
type Join struct { Operator JoinOperator Dest TableOrSubquery Constraint JoinConstraint }
type JoinClause ¶
type JoinClause struct { TableOrSubquery TableOrSubquery Joins []Join }
type JoinConstraint ¶
type JoinConstraint struct { On *Expr Using *ColumnList }
type JoinOperator ¶
type LikeExpr ¶
type LikeExpr struct { Expr Expr Escape *EscapeExpr }
type LimitClause ¶
type LiteralValue ¶
type LiteralValue struct { Numeric *NumericLiteral String *StringLiteral Blob *BlobLiteral Null *Empty True *Empty False *Empty CurrentTime *Empty CurrentDate *Empty CurrentTimestamp *Empty }
type NotExistsExpr ¶
type NotExistsExpr struct {
Not *Empty
}
type NumericLiteral ¶
type NumericLiteral struct { }
type OrderByClause ¶
type OrderByClause AtLeastOne[OrderingTerm]
type OrderingTerm ¶
type OverClause ¶
type OverClause struct { WindowName *string Window *WindowDefn }
type QualifiedTable ¶
type QualifiedTable struct { Table Table As *AsAliasExpr Index *IndexExpr }
type RaiseFuncExpr ¶
type RaiseFuncExpr struct { }
type ReplaceOrInsertExpr ¶
type ReplaceOrInsertExpr struct { Replace *Empty Insert *InsertExpr }
type ResultColumn ¶
type ResultColumn struct { Expr *ReturningExpr TableDotStar *string }
type ResultColumnList ¶
type ResultColumnList AtLeastOne[ResultColumn]
type ReturningClause ¶
type ReturningClause struct {
Expr AtLeastOne[ReturningExpr]
}
type ReturningExpr ¶
type ReturningExpr struct { Star *Empty Expr *ColumnAliasExpr }
type SelectCore ¶
type SelectCore struct { Expr *SelectExpr Values *Values }
type SelectExpr ¶
type SelectExpr struct { Distinct *Empty All *Empty Column ResultColumnList From FromExpr Where *Expr GroupBy *ExprList Having *Expr Window *AtLeastOne[WindowExpr] }
type SelectStmt ¶
type SelectStmt FactoredSelectStmt
func (SelectStmt) Build ¶
func (b SelectStmt) Build(w io.Writer)
type SelectStmtExpr ¶
type SelectStmtExpr struct { SelectStmt *SelectStmt Expr ExprList }
type SetExpr ¶
type SetExpr struct { Column *string Columns *ColumnList Expr Expr }
type SignedNumber ¶
type SignedNumber struct { Positive *Empty Negative *Empty Number NumericLiteral }
type SimpleSelectStmt ¶
type SimpleSelectStmt struct { With *WithCommonTableExpr Select SelectCore OrderBy *OrderByClause Limit *LimitClause }
type StringLiteral ¶
type StringLiteral struct { }
type TableExpr ¶
type TableExpr struct { Table *string TableFunc *TableFuncExpr }
type TableFuncExpr ¶
type TableOrSubquery ¶
type TableOrSubquery struct { Schema *string TableExpr *struct { Name string Index IndexExpr } TableFunc *TableFuncExpr Select *SelectStmt As *AsAliasExpr Recursive *struct { R *AtLeastOne[TableOrSubquery] Join *JoinClause } }
type TypeName ¶
type TypeName struct { Name AtLeastOne[string] One *SignedNumber Pair *Pair[SignedNumber] }
type UnaryExpr ¶
type UnaryExpr struct { Operator UnaryOperator Expr Expr }
type UnaryOperator ¶
type UnaryOperator string
type UpdateSetExpr ¶
type UpdateSetExpr AtLeastOne[SetExpr]
type UpdateStmt ¶
type UpdateStmt struct { With *WithCommonTableExpr Opt *WriteFailOpt Table QualifiedTable Set UpdateSetExpr From *FromExpr Where *Expr Returning *ReturningClause }
type UpdateStmtLimited ¶
type UpdateStmtLimited struct { Update UpdateStmt OrderBy *OrderByClause Limit *LimitClause }
type UpsertClause ¶
type UpsertClause AtLeastOne[UpsertExpr]
type UpsertExpr ¶
type UpsertExpr struct { Target ConflictTarget Nothing *Empty Update *struct { Set *UpdateSetExpr Where *Expr } }
type Values ¶
type Values AtLeastOne[ExprList]
type WhenThenExpr ¶
type WindowDefn ¶
type WindowDefn struct { BaseName *string PartitionBy *ExprList OrderBy *OrderByClause Frame *FrameSpec }
type WindowExpr ¶
type WindowExpr struct { Name string As WindowDefn }
type WithCommonTableExpr ¶
type WithCommonTableExpr struct { Recursive *Empty TableExpr AtLeastOne[CommonTableExpr] }
Source Files ¶
- clause_join.go
- clause_limit.go
- clause_order_by.go
- clause_returing.go
- clause_upsert.go
- expr.go
- expr_between_and.go
- expr_binary.go
- expr_bind_parameter.go
- expr_case_when.go
- expr_cast_as.go
- expr_common_table.go
- expr_distinct_from.go
- expr_exists.go
- expr_func.go
- expr_generic.go
- expr_in.go
- expr_like_or_grm.go
- expr_list.go
- expr_null.go
- expr_raise_func.go
- expr_table_column.go
- expr_unary.go
- expr_window.go
- stmt_delete.go
- stmt_insert.go
- stmt_select.go
- stmt_update.go
Click to show internal directories.
Click to hide internal directories.