querychecker

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

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

View Source
const (
	MaxRangeLimit = ""
)

Variables

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

Functions

func Check

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

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.

Jump to

Keyboard shortcuts

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