selector

package
v0.0.0-...-3245bf1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2020 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Row

type Row interface {
	Field([]byte) []byte
}

Row defines a row of columnar data.

Note that the field name and field values are represented as []byte since stomp header names and values are represented as []byte to avoid extra allocations when converting from []byte to string.

type Selector

type Selector struct {
	*parse.Tree
}

Selector reprents a parsed SQL selector statement.

func Parse

func Parse(b []byte) (selector *Selector, err error)

Parse parses the SQL statement and returns a new Statement object.

func (*Selector) Eval

func (s *Selector) Eval(row Row) (match bool, err error)

Eval evaluates the SQL statement using the provided data and returns true if all conditions are satisfied. If a runtime error is experiences a false value is returned along with an error message.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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