Documentation ¶
Overview ¶
Package querychecker performs a semantic check on an AST produced by the queryparser package.
For the foreseeasble future, only SelectStatements are supported. The following clauses are checked sequentially, SelectClause FromClause WhereClause (optional) LimitClause (optional) ResultsOffsetClause (optional)
Index ¶
- Constants
- Variables
- func Check(db ds.Database, s *queryparser.Statement) error
- func CompileIndexRanges(idxField *queryparser.Field, kind vdl.Kind, where *queryparser.WhereClause) *ds.IndexRanges
- func ContainsFieldOperand(f *queryparser.Field, expr *queryparser.Expression) bool
- func ContainsFunctionOperand(expr *queryparser.Expression) bool
- func ContainsKeyOperand(expr *queryparser.Expression) bool
- func ContainsValueFieldOperand(expr *queryparser.Expression) bool
- func IsExactField(f *queryparser.Field, o *queryparser.Operand) bool
- func IsExpr(o *queryparser.Operand) bool
- func IsField(o *queryparser.Operand) bool
- func IsFunction(o *queryparser.Operand) bool
- func IsKey(o *queryparser.Operand) bool
- func IsKeyField(f *queryparser.Field) bool
- func IsLogicalOperator(o *queryparser.BinaryOperator) bool
- func IsValueField(f *queryparser.Field) bool
Constants ¶
View Source
const (
MaxRangeLimit = ""
)
Variables ¶
View Source
var (
StringFieldRangeAll = ds.StringFieldRange{Start: "", Limit: MaxRangeLimit}
)
Functions ¶
func CompileIndexRanges ¶
func CompileIndexRanges(idxField *queryparser.Field, kind vdl.Kind, where *queryparser.WhereClause) *ds.IndexRanges
Compute a list of secondary index ranges to optionally be used by query's Table.Scan.
func ContainsFieldOperand ¶
func ContainsFieldOperand(f *queryparser.Field, expr *queryparser.Expression) bool
func ContainsFunctionOperand ¶
func ContainsFunctionOperand(expr *queryparser.Expression) bool
func ContainsKeyOperand ¶
func ContainsKeyOperand(expr *queryparser.Expression) bool
func ContainsValueFieldOperand ¶
func ContainsValueFieldOperand(expr *queryparser.Expression) bool
func IsExactField ¶
func IsExactField(f *queryparser.Field, o *queryparser.Operand) bool
func IsExpr ¶
func IsExpr(o *queryparser.Operand) bool
func IsField ¶
func IsField(o *queryparser.Operand) bool
func IsFunction ¶
func IsFunction(o *queryparser.Operand) bool
func IsKey ¶
func IsKey(o *queryparser.Operand) bool
func IsKeyField ¶
func IsKeyField(f *queryparser.Field) bool
func IsLogicalOperator ¶
func IsLogicalOperator(o *queryparser.BinaryOperator) bool
func IsValueField ¶
func IsValueField(f *queryparser.Field) bool
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.