ast

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComparisonNode

type ComparisonNode struct {
	Column string
	Op     Operator
	Value  any
	Values []any
}

type Direction

type Direction int
const (
	Asc Direction = iota
	Desc
)

type LogicalOp

type LogicalOp int
const (
	LogicalAnd LogicalOp = iota
	LogicalOr
	LogicalNot
)

type Operator

type Operator int
const (
	OpEq Operator = iota
	OpNEQ
	OpGT
	OpGTE
	OpLT
	OpLTE
	OpLike
	OpILike
	OpIn
	OpNotIn
	OpBetween
	OpIsNull
	OpIsNotNull
)

type OrderByExpr

type OrderByExpr struct {
	Column    string
	Direction Direction
}

type QueryType

type QueryType int
const (
	QuerySelect QueryType = iota
	QueryCount
	QueryExists
)

type SelectNode

type SelectNode struct {
	Table   string
	Columns []string
	Where   *WhereClause
	OrderBy []OrderByExpr
	Limit   *int
	Offset  *int
	Type    QueryType
}

type WhereClause

type WhereClause struct {
	Comparison *ComparisonNode
	LogicalOp  LogicalOp
	Children   []WhereClause
	Raw        *string
	RawArgs    []any
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL