Documentation
¶
Overview ¶
Package parser provides parsers for SQLite SQL statements.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatLiterals ¶
FormatLiterals returns a string representation of the literals
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser represents a SQL parser for SQLite.
func (*Parser) ParseProgram ¶
ParseProgram parses a complete SQL program.
type SimpleLiteralParser ¶
type SimpleLiteralParser struct {
// contains filtered or unexported fields
}
SimpleLiteralParser is a lightweight parser that only extracts literals from SQL
func NewSimpleLiteralParser ¶
func NewSimpleLiteralParser(input string) *SimpleLiteralParser
NewSimpleLiteralParser creates a new SimpleLiteralParser
func (*SimpleLiteralParser) ExtractLiterals ¶
func (p *SimpleLiteralParser) ExtractLiterals() []ast.Literal
ExtractLiterals extracts all literals from an SQL statement
func (*SimpleLiteralParser) ParseCondition ¶
func (p *SimpleLiteralParser) ParseCondition(input string) ast.Expression
ParseCondition parses a WHERE condition
func (*SimpleLiteralParser) ParseUpdateSetPairs ¶
func (p *SimpleLiteralParser) ParseUpdateSetPairs(input string) []ast.SetPair
ParseUpdateSetPairs parses key-value pairs in an UPDATE statement
Click to show internal directories.
Click to hide internal directories.