Versions in this module Expand all Collapse all v0 v0.1.2 Aug 25, 2026 v0.1.1 Jul 31, 2026 Changes in this version type DeleteStmt + Limit *Limit + OrderBy []*OrderingTerm type UpdateStmt + Limit *Limit + OrderBy []*OrderingTerm v0.1.0 Jul 31, 2026 Changes in this version + func Statements(stmts []Stmt) string + func String(n Node) string + func Walk(n Node, fn func(Node) bool) + type AlterAction int + const AlterAddColumn + const AlterAddConstraintCheck + const AlterDropColumn + const AlterDropConstraint + const AlterDropNotNull + const AlterRenameColumn + const AlterRenameTable + const AlterSetNotNull + func (a AlterAction) String() string + type AlterTableStmt struct + Action AlterAction + Column *Ident + ColumnDef *ColumnDef + ColumnKeyword bool + ConstraintName *Ident + Expr Expr + NewName *Ident + OnConflict ConflictAction + Table *QualifiedName + func (n *AlterTableStmt) Children() []Node + func (n *AlterTableStmt) String() string + type AnalyzeStmt struct + Name *QualifiedName + func (n *AnalyzeStmt) Children() []Node + type AttachStmt struct + File Expr + HasDatabase bool + Key Expr + Name Expr + func (n *AttachStmt) Children() []Node + type BeginStmt struct + HasTransaction bool + HasType bool + Name *Ident + Type TransactionType + func (n *BeginStmt) Children() []Node + type BetweenExpr struct + Hi Expr + Lo Expr + Not bool + X Expr + func (n *BetweenExpr) Children() []Node + type BinaryExpr struct + Op Operator + X Expr + Y Expr + func (n *BinaryExpr) Children() []Node + type BindParam struct + Kind ParamKind + Name string + Number int + Raw string + func (n *BindParam) Children() []Node + type CTE struct + Columns []*Ident + Materialized Materialized + Name *Ident + Select *SelectStmt + func (n *CTE) Children() []Node + type CaseExpr struct + Else Expr + Operand Expr + Whens []*CaseWhen + func (n *CaseExpr) Children() []Node + type CaseWhen struct + Then Expr + When Expr + func (n *CaseWhen) Children() []Node + type CastExpr struct + Type *TypeName + X Expr + func (n *CastExpr) Children() []Node + type CollateExpr struct + Name *Ident + X Expr + func (n *CollateExpr) Children() []Node + type ColumnConstraint struct + AlwaysWord bool + AutoIncrement bool + Collation *Ident + Deferrable *DeferClause + Expr Expr + GeneratedKind *Ident + Kind ColumnConstraintKind + Name *Ident + OnConflict ConflictAction + Order SortOrder + References *ForeignKeyClause + func (n *ColumnConstraint) Children() []Node + type ColumnConstraintKind int + const ColumnCheck + const ColumnCollate + const ColumnDefault + const ColumnDeferrable + const ColumnGenerated + const ColumnNotNull + const ColumnNull + const ColumnPrimaryKey + const ColumnReferences + const ColumnUnique + func (k ColumnConstraintKind) String() string + type ColumnDef struct + Constraints []*ColumnConstraint + Name *ColumnName + Type *TypeName + func (n *ColumnDef) Children() []Node + type ColumnName = Ident + type CommitStmt struct + HasTransaction bool + Keyword string + Name *Ident + func (n *CommitStmt) Children() []Node + type CompoundOp struct + All bool + Op string + func (n *CompoundOp) Children() []Node + type ConflictAction int + const ConflictAbort + const ConflictDefault + const ConflictFail + const ConflictIgnore + const ConflictReplace + const ConflictRollback + func (a ConflictAction) String() string + type CreateIndexStmt struct + Columns []*OrderingTerm + IfNotExists bool + Name *QualifiedName + Table *Ident + Unique bool + Where Expr + func (n *CreateIndexStmt) Children() []Node + func (n *CreateIndexStmt) String() string + type CreateTableStmt struct + Columns []*ColumnDef + Constraints []*TableConstraint + IfNotExists bool + Name *QualifiedName + Options []*TableOption + Select *SelectStmt + Temp bool + func (n *CreateTableStmt) Children() []Node + func (n *CreateTableStmt) String() string + type CreateTriggerStmt struct + Body []Stmt + Event string + ForEachRow bool + HasTime bool + IfNotExists bool + Name *QualifiedName + Table *QualifiedName + Temp bool + Time TriggerTime + UpdateOf []*Ident + When Expr + func (n *CreateTriggerStmt) Children() []Node + func (n *CreateTriggerStmt) String() string + type CreateViewStmt struct + Columns []*IndexedColumn + IfNotExists bool + Name *QualifiedName + Select *SelectStmt + Temp bool + func (n *CreateViewStmt) Children() []Node + func (n *CreateViewStmt) String() string + type CreateVirtualTableStmt struct + Args []string + HasArgs bool + IfNotExists bool + Module *Ident + Name *QualifiedName + func (n *CreateVirtualTableStmt) Children() []Node + func (n *CreateVirtualTableStmt) String() string + type DeferClause struct + HasInitially bool + InitiallyDeferred bool + Not bool + func (n *DeferClause) Children() []Node + type DeleteStmt struct + Alias *Ident + IndexedBy *Ident + NotIndexed bool + Returning []*ResultColumn + Table *QualifiedName + Where Expr + With *With + func (n *DeleteStmt) Children() []Node + func (n *DeleteStmt) String() string + type DetachStmt struct + HasDatabase bool + Name Expr + func (n *DetachStmt) Children() []Node + type Distinct int + const DistinctAll + const DistinctDistinct + const DistinctNone + func (d Distinct) String() string + type DropIndexStmt struct + IfExists bool + Name *QualifiedName + func (n *DropIndexStmt) Children() []Node + type DropTableStmt struct + IfExists bool + Name *QualifiedName + func (n *DropTableStmt) Children() []Node + type DropTriggerStmt struct + IfExists bool + Name *QualifiedName + func (n *DropTriggerStmt) Children() []Node + type DropViewStmt struct + IfExists bool + Name *QualifiedName + func (n *DropViewStmt) Children() []Node + type ExistsExpr struct + Select *SelectStmt + func (n *ExistsExpr) Children() []Node + type ExplainStmt struct + QueryPlan bool + Stmt Stmt + func (n *ExplainStmt) Children() []Node + func (n *ExplainStmt) String() string + type Expr interface + type ForeignKeyAction int + const FKCascade + const FKNoAction + const FKRestrict + const FKSetDefault + const FKSetNull + func (a ForeignKeyAction) String() string + type ForeignKeyArg struct + Action ForeignKeyAction + Event string + Match *Ident + func (n *ForeignKeyArg) Children() []Node + type ForeignKeyClause struct + Args []*ForeignKeyArg + Columns []*IndexedColumn + Table *Ident + func (n *ForeignKeyClause) Children() []Node + type FrameBound struct + Expr Expr + Type FrameBoundType + func (n *FrameBound) Children() []Node + type FrameBoundType int + const BoundCurrentRow + const BoundFollowing + const BoundPreceding + const BoundUnboundedFollowing + const BoundUnboundedPreceding + func (b FrameBoundType) String() string + type FrameExclude int + const ExcludeCurrentRow + const ExcludeGroup + const ExcludeNoOthers + const ExcludeNone + const ExcludeTies + func (e FrameExclude) String() string + type FrameType int + const FrameGroups + const FrameNone + const FrameRange + const FrameRows + func (f FrameType) String() string + type FuncCall struct + All bool + Args []Expr + Distinct bool + Filter Expr + Name *Ident + OrderBy []*OrderingTerm + Over *WindowDef + Star bool + func (n *FuncCall) Children() []Node + type Ident struct + Name string + Quote QuoteStyle + Raw string + func (n *Ident) Children() []Node + type InExpr struct + Args []Expr + HasArgs bool + List []Expr + Not bool + Parens bool + Select *SelectStmt + Table *QualifiedName + X Expr + func (n *InExpr) Children() []Node + type IndexedColumn struct + Collation *Ident + Name *Ident + Order SortOrder + func (n *IndexedColumn) Children() []Node + type InsertStmt struct + Alias *Ident + Columns []*Ident + DefaultValues bool + OrConflict ConflictAction + Replace bool + Returning []*ResultColumn + Select *SelectStmt + Table *QualifiedName + Upserts []*Upsert + With *With + func (n *InsertStmt) Children() []Node + func (n *InsertStmt) String() string + type IsExpr struct + Distinct bool + Not bool + X Expr + Y Expr + func (n *IsExpr) Children() []Node + type JoinOperator struct + Type JoinType + Words []string + func (n *JoinOperator) Children() []Node + type JoinType int + const JoinComma + const JoinCross + const JoinInner + const JoinLeft + const JoinNatural + const JoinOuter + const JoinRight + func (t JoinType) String() string + type LikeExpr struct + Escape Expr + Not bool + Op *Ident + X Expr + Y Expr + func (n *LikeExpr) Children() []Node + type Limit struct + Comma bool + Count Expr + Offset Expr + func (n *Limit) Children() []Node + type Literal struct + Kind LiteralKind + Raw string + Value string + func (n *Literal) Children() []Node + type LiteralKind int + const LitBlob + const LitCurrentDate + const LitCurrentTime + const LitCurrentTimestamp + const LitFloat + const LitInteger + const LitNull + const LitString + func (k LiteralKind) String() string + type Materialized int + const MaterializedAny + const MaterializedNo + const MaterializedYes + func (m Materialized) String() string + type Node interface + Children func() []Node + End func() int + Pos func() int + type NullCheckExpr struct + Test NullTest + X Expr + func (n *NullCheckExpr) Children() []Node + type NullTest int + const TestIsNull + const TestNotNull + const TestNotNullWords + func (t NullTest) String() string + type NullsOrder int + const NullsDefault + const NullsFirst + const NullsLast + func (o NullsOrder) String() string + type Operator int + const OpAdd + const OpAnd + const OpBitAnd + const OpBitNot + const OpBitOr + const OpConcat + const OpDiv + const OpEq + const OpGe + const OpGt + const OpLShift + const OpLe + const OpLt + const OpMinus + const OpMod + const OpMul + const OpNe + const OpNone + const OpNot + const OpOr + const OpPlus + const OpPtr + const OpPtr2 + const OpRShift + const OpSub + func (o Operator) String() string + type OrderingTerm struct + Expr Expr + Nulls NullsOrder + Order SortOrder + func (n *OrderingTerm) Children() []Node + type ParamKind int + const ParamAnon + const ParamAt + const ParamColon + const ParamDollar + const ParamNumber + func (k ParamKind) String() string + type ParenExpr struct + X Expr + func (n *ParenExpr) Children() []Node + type PragmaStmt struct + HasValue bool + Name *QualifiedName + Paren bool + Value string + func (n *PragmaStmt) Children() []Node + type QualifiedName struct + Name *Ident + Schema *Ident + func (n *QualifiedName) Children() []Node + type QualifiedRef struct + Parts []*Ident + func (n *QualifiedRef) Children() []Node + type QuoteStyle byte + const QuoteBack + const QuoteDouble + const QuoteNone + const QuoteSingle + const QuoteSquare + func (q QuoteStyle) String() string + type RaiseExpr struct + Action string + Message Expr + func (n *RaiseExpr) Children() []Node + type ReindexStmt struct + Name *QualifiedName + func (n *ReindexStmt) Children() []Node + type ReleaseStmt struct + Name *Ident + SavepointKeyword bool + func (n *ReleaseStmt) Children() []Node + type ResultColumn struct + Alias *Ident + Expr Expr + HasAs bool + func (n *ResultColumn) Children() []Node + type RollbackStmt struct + HasTransaction bool + Name *Ident + Savepoint *Ident + SavepointKeyword bool + func (n *RollbackStmt) Children() []Node + type SavepointStmt struct + Name *Ident + func (n *SavepointStmt) Children() []Node + type SelectCore interface + type SelectQuery struct + Columns []*ResultColumn + Distinct Distinct + From []*TableRef + GroupBy []Expr + Having Expr + Limit *Limit + OrderBy []*OrderingTerm + Where Expr + Windows []*WindowDef + func (n *SelectQuery) Children() []Node + type SelectStmt struct + Cores []SelectCore + Ops []CompoundOp + With *With + func (n *SelectStmt) Children() []Node + func (n *SelectStmt) String() string + type SetPair struct + Columns []*Ident + Paren bool + Value Expr + func (n *SetPair) Children() []Node + type SortOrder int + const SortAsc + const SortDefault + const SortDesc + func (o SortOrder) String() string + type Span struct + Start int + Stop int + func (s *Span) SetSpan(sp Span) + func (s Span) End() int + func (s Span) Pos() int + type Star struct + Table *Ident + func (n *Star) Children() []Node + type Stmt interface + SetSpan func(Span) + type SubqueryExpr struct + Select *SelectStmt + func (n *SubqueryExpr) Children() []Node + type TableConstraint struct + AutoIncrement bool + Columns []*OrderingTerm + Deferrable *DeferClause + Expr Expr + FKColumns []*IndexedColumn + Kind TableConstraintKind + Name *Ident + OnConflict ConflictAction + References *ForeignKeyClause + func (n *TableConstraint) Children() []Node + type TableConstraintKind int + const TableCheck + const TableForeignKey + const TablePrimaryKey + const TableUnique + func (k TableConstraintKind) String() string + type TableOption struct + Name *Ident + Without bool + func (n *TableOption) Children() []Node + type TableRef struct + Alias *Ident + Args []Expr + HasArgs bool + HasAs bool + IndexedBy *Ident + Join *JoinOperator + List []*TableRef + Name *QualifiedName + NotIndexed bool + On Expr + Select *SelectStmt + Using []*Ident + func (n *TableRef) Children() []Node + type TransactionType int + const TxnDeferred + const TxnExclusive + const TxnImmediate + func (t TransactionType) String() string + type TriggerTime int + const TriggerAfter + const TriggerBefore + const TriggerInsteadOf + func (t TriggerTime) String() string + type TypeName struct + Args []string + Name string + Raw string + func (n *TypeName) Children() []Node + type UnaryExpr struct + Op Operator + X Expr + func (n *UnaryExpr) Children() []Node + type UpdateStmt struct + Alias *Ident + From []*TableRef + IndexedBy *Ident + NotIndexed bool + OrConflict ConflictAction + Returning []*ResultColumn + Set []*SetPair + Table *QualifiedName + Where Expr + With *With + func (n *UpdateStmt) Children() []Node + func (n *UpdateStmt) String() string + type Upsert struct + DoNothing bool + Set []*SetPair + Target []*OrderingTerm + TargetWhere Expr + Where Expr + func (n *Upsert) Children() []Node + type VacuumStmt struct + Into Expr + Schema *Ident + func (n *VacuumStmt) Children() []Node + type ValuesClause struct + Rows [][]Expr + func (n *ValuesClause) Children() []Node + type VectorExpr struct + List []Expr + func (n *VectorExpr) Children() []Node + type WindowDef struct + Base *Ident + EndBound *FrameBound + Exclude FrameExclude + Frame FrameType + Name *Ident + NameOnly bool + OrderBy []*OrderingTerm + Partition []Expr + StartBound *FrameBound + func (n *WindowDef) Children() []Node + type With struct + CTEs []*CTE + Recursive bool + func (n *With) Children() []Node