Documentation ¶
Overview ¶
Package query_checker performs a semantic check on an AST produced by the query_parser 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 *query_parser.Statement) error
- func CompileIndexRanges(idxField *query_parser.Field, kind vdl.Kind, where *query_parser.WhereClause) *ds.IndexRanges
- func ContainsFieldOperand(f *query_parser.Field, expr *query_parser.Expression) bool
- func ContainsFunctionOperand(expr *query_parser.Expression) bool
- func ContainsKeyOperand(expr *query_parser.Expression) bool
- func ContainsValueFieldOperand(expr *query_parser.Expression) bool
- func IsExactField(f *query_parser.Field, o *query_parser.Operand) bool
- func IsExpr(o *query_parser.Operand) bool
- func IsField(o *query_parser.Operand) bool
- func IsFunction(o *query_parser.Operand) bool
- func IsKey(o *query_parser.Operand) bool
- func IsKeyField(f *query_parser.Field) bool
- func IsLogicalOperator(o *query_parser.BinaryOperator) bool
- func IsValueField(f *query_parser.Field) bool
Constants ¶
View Source
const (
MaxRangeLimit = ""
)
Variables ¶
View Source
var (
StringFieldRangeAll = ds.StringFieldRange{Start: "", Limit: MaxRangeLimit}
)
Functions ¶
func CompileIndexRanges ¶
func CompileIndexRanges(idxField *query_parser.Field, kind vdl.Kind, where *query_parser.WhereClause) *ds.IndexRanges
Compute a list of secondary index ranges to optionally be used by query's Table.Scan.
func ContainsFieldOperand ¶
func ContainsFieldOperand(f *query_parser.Field, expr *query_parser.Expression) bool
func ContainsFunctionOperand ¶
func ContainsFunctionOperand(expr *query_parser.Expression) bool
func ContainsKeyOperand ¶
func ContainsKeyOperand(expr *query_parser.Expression) bool
func ContainsValueFieldOperand ¶
func ContainsValueFieldOperand(expr *query_parser.Expression) bool
func IsExactField ¶
func IsExactField(f *query_parser.Field, o *query_parser.Operand) bool
func IsExpr ¶
func IsExpr(o *query_parser.Operand) bool
func IsField ¶
func IsField(o *query_parser.Operand) bool
func IsFunction ¶
func IsFunction(o *query_parser.Operand) bool
func IsKey ¶
func IsKey(o *query_parser.Operand) bool
func IsKeyField ¶
func IsKeyField(f *query_parser.Field) bool
func IsLogicalOperator ¶
func IsLogicalOperator(o *query_parser.BinaryOperator) bool
func IsValueField ¶
func IsValueField(f *query_parser.Field) bool
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.