Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func IsSystemDatabase ¶
func IsSystemSchema ¶
func SplitSQLStatement ¶
Types ¶
type AST ¶
type AST struct {
// StartPosition is the 1-based position where this statement starts.
StartPosition *storepb.Position
Stmt statements.Statement[tree.Statement]
}
AST is the AST implementation for CockroachDB parser. It implements the base.AST interface.
func GetCockroachDBAST ¶
GetCockroachDBAST extracts the CockroachDB AST from a base.AST. Returns the AST and true if it is a CockroachDB AST, nil and false otherwise.
func (*AST) ASTStartPosition ¶
ASTStartPosition implements base.AST interface.
type ParseResult ¶
type ParseResult struct {
Stmts statements.Statements
}
func ParseCockroachDBSQL ¶
func ParseCockroachDBSQL(statement string) (*ParseResult, error)
ParseCockroachDBSQL parses the given CockroachDB statement by using LALR(1) parser. Returns the AST if no error.
Click to show internal directories.
Click to hide internal directories.