query_checker

package
v0.0.0-...-0921c0e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2017 License: BSD-3-Clause Imports: 7 Imported by: 0

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

View Source
const (
	MaxRangeLimit = ""
)

Variables

View Source
var (
	StringFieldRangeAll = ds.StringFieldRange{Start: "", Limit: MaxRangeLimit}
)

Functions

func Check

func Check(db ds.Database, s *query_parser.Statement) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL