Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BinaryExpr ¶
BinaryExpr represents an operation between two expressions.
func (*BinaryExpr) Args ¶
func (e *BinaryExpr) Args() []string
func (*BinaryExpr) String ¶
func (e *BinaryExpr) String() string
String returns a string representation of the binary expression.
type BooleanLiteral ¶
type BooleanLiteral struct {
Val bool
}
BooleanLiteral represents a boolean literal.
func (*BooleanLiteral) Args ¶
func (l *BooleanLiteral) Args() []string
func (*BooleanLiteral) String ¶
func (l *BooleanLiteral) String() string
String returns a string representation of the literal.
type Node ¶
type Node interface { String() string // contains filtered or unexported methods }
Node represents a node in the conditions abstract syntax tree.
type NumberLiteral ¶
type NumberLiteral struct {
Val float64
}
NumberLiteral represents a numeric literal.
func (*NumberLiteral) Args ¶
func (n *NumberLiteral) Args() []string
func (*NumberLiteral) String ¶
func (n *NumberLiteral) String() string
String returns a string representation of the literal.
type Operand ¶
func InclusionOperands ¶
func InclusionOperands(predicate abstract.WhereStatement, col string) ([]Operand, error)
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser encapsulates the scanner and responsible for returning AST composed of statements read from a given reader.
type StringLiteral ¶
type StringLiteral struct {
Val string
}
StringLiteral represents a string literal.
func (*StringLiteral) Args ¶
func (l *StringLiteral) Args() []string
func (*StringLiteral) String ¶
func (l *StringLiteral) String() string
String returns a string representation of the literal.
type Token ¶
type Token int
Token represents a lexical token.
const ( // ILLEGAL token represent illegal token found in the statement ILLEGAL Token = iota // EOF token represents end of statement EOF // Literals NUMBER // 12345.67 STRING // "abc" TRUE // true FALSE // false AND // AND OR // OR EQ // = NEQ // != LT // < LTE // <= GT // > GTE // >= LPAREN // ( RPAREN // ) NOT // NOT )
func (Token) Precedence ¶
Precedence returns the operator precedence of the binary operator token.