expr

package
v0.0.0-...-86e9f11 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package expr implements the AST representation of query expressions.

Each of the AST node types satisfies the Node interface.

The critical entry points for this package are Walk, Check, and Simplify. Those routines allow a caller to examine the AST and collect output diagnostics or perform rewriting.

Index

Constants

View Source
const (
	ApproxCountDistinctMinPrecision     = 4
	ApproxCountDistinctMaxPrecision     = 16
	ApproxCountDistinctDefaultPrecision = 11
)

Variables

View Source
var IsKeyword func(s string) bool

IsKeyword is the function that the expr library uses to determine if a string would match as a PartiQL keyword.

(Please don't set this yourself; it is set by expr/partiql so that they can share keyword tables.)

View Source
var NaN = Float(math.NaN())
View Source
var NoHint noHint
View Source
var TimePartMultiplier = [...]uint64{
	Microsecond: 1,
	Millisecond: 1000,
	Second:      1000000,
	Minute:      1000000 * 60,
	Hour:        1000000 * 60 * 60,
	Day:         1000000 * 60 * 60 * 24,
	DOW:         0,
	DOY:         0,
	Week:        1000000 * 60 * 60 * 24 * 7,
	Month:       0,
	Quarter:     0,
	Year:        0,
}

TimePartMultiplier provides part to microsecond multiplication constant of time parts that don't require decomposition from unix time.

Functions

func Check

func Check(n Node) error

Check walks the AST given by n and performs rudimentary sanity-checking on all of the values in the tree.

func CheckHint

func CheckHint(n Node, h Hint) error

CheckHint performs the same sanity-checking as Check, except that it uses additional type-hint information.

func DefaultBinding

func DefaultBinding(e Node) string

DefaultBinding returns the default binding for the node e, or the empty string if the expression has no default binding.

func EncodeBindings

func EncodeBindings(bind []Binding, dst *ion.Buffer, st *ion.Symtab)

func EncodeOrder

func EncodeOrder(ord []Order, dst *ion.Buffer, st *ion.Symtab)

func Equal

func Equal(a, b Node) bool

Equal returns whether a and b are equivalent. a or b may be nil.

func Equivalent

func Equivalent(a, b Node) bool

Equivalent returns whether two nodes are equivalent.

Two nodes are equal if they are equivalent numbers (i.e. '0' and '0.0') or if they are identical.

func FlatPath

func FlatPath(e Node) ([]string, bool)

FlatPath attempts to flatten e into a list of path components. For example, the expression a.b.c would expand to

[]string{"a", "b", "c"}

FlatPath returns (nil, false) if e is not a path or the path cannot be flattened.

func IsConstant

func IsConstant(e Node) bool

IsConstant returns true if node is a constant value

func IsIdentifier

func IsIdentifier(e Node, s string) bool

IsIdentifier returns whether e == Ident(s), in other words, a path expression with a single component that is equivalent to the given string.

func IsPath

func IsPath(e Node) bool

IsPath returns whether or not e is a path expression. A path expression is composed entirely of Ident, Dot, and Index operations.

func JSONTypeBits

func JSONTypeBits(typ ion.Type) uint

JSONTypeBits returns a unique bit pattern associated with the given ion type. (This is the constprop'd version of the TYPE_BIT function.)

func Quote

func Quote(s string) string

Quote produces SQL single-quoted strings; escape sequences are encoded using either the traditional ascii escapes (\n, \t, etc.) or extended unicode escapes (\u0100, etc.) where appropriate

func QuoteID

func QuoteID(s string) string

QuoteID produces a textual PartiQL identifier; the returned string will be double-quoted with escapes if it contains non-printable characters or it is a PartiQL keyword.

func ToRedacted

func ToRedacted(p Printable) string

ToRedacted returns the string representation of this AST node and its children in approximately PartiQL syntax, but with all constant expressions replaced with random (deterministic) values.

func ToString

func ToString(p Printable) string

ToString returns the string representation of this AST node and its children in approximately PartiQL syntax

func Unescape

func Unescape(buf []byte) (string, error)

Unescape converts special sequences \t, \n and also unicode chars \uhhhh into plain string.

func Unquote

func Unquote(s string) (string, error)

Unquote extracts the quoted and escaped SQL string

See: Quote

func Walk

func Walk(v Visitor, n Node)

Walk traverses an AST in depth-first order: It starts by calling v.Visit(node); node must not be nil. If the visitor w returned by v.Visit(node) is not nil, Walk is invoked recursively with visitor w for each of the non-nil children of node, followed by a call of w.Visit(nil).

(see also: ast.Walk)

Types

type Aggregate

type Aggregate struct {
	// Op is the aggregation operation
	// (sum, min, max, etc.)
	Op AggregateOp
	// Miscellaneous data: used by OpTDigest to store percentile values q
	Misc float32
	// Precision is the parameter for OpApproxCountDistinct
	Precision uint8
	// Role describes how aggregate is supposed to be used in a multi-node architecture
	Role AggregateRole
	// Inner is the expression to be aggregated;
	// this may be nil when the operation is a window function
	Inner Node
	// Over, if non-nil, is the OVER part
	// of the aggregation
	Over *Window
	// Filter is an optional filtering expression
	Filter Node
}

Aggregate is an aggregation expression

func AggregateAnd

func AggregateAnd(e Node) *Aggregate

func AggregateBoolAnd

func AggregateBoolAnd(e Node) *Aggregate

func AggregateBoolOr

func AggregateBoolOr(e Node) *Aggregate

func AggregateOr

func AggregateOr(e Node) *Aggregate

func AggregateXor

func AggregateXor(e Node) *Aggregate

func Avg

func Avg(e Node) *Aggregate

Avg produces the AVG(e) aggregate

func Count

func Count(e Node) *Aggregate

Count produces the COUNT(e) aggregate

func CountDistinct

func CountDistinct(e Node) *Aggregate

CountDistinct produces the COUNT(DISTINCT e) aggregate

func CountNonNull

func CountNonNull(e Node) *Aggregate

CountNonNull counts the number of non-null rows

func Earliest

func Earliest(e Node) *Aggregate

Earliest produces the EARLIEST(timestamp) aggregate

func Latest

func Latest(e Node) *Aggregate

Latest produces the LATEST(timestamp) aggregate

func Max

func Max(e Node) *Aggregate

Max produces the MAX(e) aggregate

func Min

func Min(e Node) *Aggregate

Min produces the MIN(e) aggregate

func Sum

func Sum(e Node) *Aggregate

Sum produces the SUM(e) aggregate

func SumCount

func SumCount(e Node) *Aggregate

SumCount produces the SUM(e) aggregate that may be used to aggregate COUNT(...) results

func SumInt

func SumInt(e Node) *Aggregate

SumInt produces the SUM(e) aggregate that is guaranteed to operate only on integer inputs

func (*Aggregate) Encode

func (a *Aggregate) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Aggregate) Equals

func (a *Aggregate) Equals(e Node) bool

func (*Aggregate) IsDistinct

func (a *Aggregate) IsDistinct() bool

IsDistinct returns if the aggregate has DISTINCT clause.

func (*Aggregate) SetField

func (a *Aggregate) SetField(f ion.Field) error

type AggregateOp

type AggregateOp int

AggregateOp is one of the aggregation operations

const (
	// Invalid or no aggregate operation - if you see this it means that the value was either not
	// initialized yet or it describes non-aggregate operation (for example ssainfo.aggregateOp).
	OpNone AggregateOp = iota

	// Describes SQL COUNT(...) aggregate operation
	OpCount

	// Describes SQL SUM(...) aggregate operation.
	OpSum

	// Describes SQL AVG(...) aggregate
	OpAvg

	// Describes SQL MIN(...) aggregate operation.
	OpMin

	// Describes SQL MAX(...) aggregate operation.
	OpMax

	// Describes SQL COUNT(DISTINCT ...) operation
	OpCountDistinct

	// OpSumInt is equivalent to the SUM() operation,
	// except that it only accepts integer inputs
	// (and therefore always produces an integer output)
	OpSumInt

	// OpSumCount is equivalent to the SUM() operation,
	// except that it evaluates to 0 instead of
	// NULL if there are no inputs. This should be
	// used to aggregate COUNT(...) results instead
	// of SUM_INT.
	OpSumCount

	// Describes SQL BIT_AND(...) aggregate operation.
	OpBitAnd

	// Describes SQL BIT_OR(...) aggregate operation.
	OpBitOr

	// Describes SQL BIT_XOR(...) aggregate operation.
	OpBitXor

	// Describes SQL BOOL_AND(...) aggregate operation.
	OpBoolAnd

	// Describes SQL BOOL_OR(...) aggregate operation.
	OpBoolOr

	// Describes SQL MIN(timestamp).
	//
	// EARLIEST() function is used by Sneller to distinguish
	// between arithmetic vs timestamp aggregation
	OpEarliest

	// Describes SQL MAX(timestamp).
	//
	// LATEST() function is used by Sneller to distinguish
	// between arithmetic vs timestamp aggregation
	OpLatest

	// Describes APPROX_COUNT_DISTINCT aggregate, that produces
	// an integer output
	OpApproxCountDistinct

	// OpVariancePop is equivalent to the VARIANCE() and VARIANCE_POP()
	// operation and calculates the population variance
	OpVariancePop

	// OpStdDevPop is equivalent to the STDDEV() and STDDEV_POP() operation
	// Note that it does not calculate the sample standard deviation
	OpStdDevPop

	// OpApproxPercentile is equivalent to APPROX_PERCENTILE() operation
	OpApproxPercentile

	// OpApproxMedian is equivalent to (non-SQL but eg present in snowflake) APPROX_MEDIAN() operation
	OpApproxMedian

	// OpRowNumber corresponds to ROW_NUMBER()
	OpRowNumber

	// OpRank corresponds to RANK()
	OpRank

	// OpDenseRank corresponds to DENSE_RANK()
	OpDenseRank

	// Describes SNELLER_DATASHAPE aggregate
	OpSystemDatashape

	// Describes SNELLER_DATASHAPE_MERGE aggregate, that
	// merges the results from multiple SNELLER_DATASHAPE
	// aggregates.
	OpSystemDatashapeMerge
)

func (AggregateOp) AcceptDistinct

func (a AggregateOp) AcceptDistinct() bool

AcceptDistinct returns true if the aggregate can be used with DISTINCT keyword.

func (AggregateOp) AcceptExpression

func (a AggregateOp) AcceptExpression() bool

AcceptExpression returns true if the aggregate can be used with an arbitrary expression.

func (AggregateOp) AcceptStar

func (a AggregateOp) AcceptStar() bool

AcceptStar returns true if the aggregate can be used with '*'.

func (AggregateOp) String

func (a AggregateOp) String() string

func (AggregateOp) WindowOnly

func (a AggregateOp) WindowOnly() bool

WindowOnly returns whether or no the aggregate op is only valid when used with a window function

type AggregateRole

type AggregateRole uint8

AggregateRole describes how the aggregate's internal state has to be interpreted.

In the case of single-node execution, the state lives locally and is transformed into the final value (AggregateRoleFinal: that's the default behaviour).

In the case of multi-node execution, the state can be build on a child node, and then transferred to the main node (AggregateRolePartial). On the main node, the internal state is used to update the local state and then to calculate the final value (AggregateRoleMerge).

const (
	// Aggregate yields the final value, to be consumed by "end user" (the default)
	AggregateRoleFinal AggregateRole = iota

	// Aggregate collects some data in internal state, and the state is supposed
	// to be pushed forward.
	AggregateRolePartial

	// Aggregate gathers data from its counterpart having role AggregateRolePartial
	// and is supposed to produce a final value in the end.
	AggregateRoleMerge
)

func (AggregateRole) String

func (r AggregateRole) String() string

type Appended

type Appended struct {
	Values []Node
}

Appended is an append (++) expression

func Append

func Append(left, right Node) *Appended

func (*Appended) Encode

func (a *Appended) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Appended) Equals

func (a *Appended) Equals(x Node) bool

func (*Appended) SetField

func (a *Appended) SetField(f ion.Field) error

type ArithOp

type ArithOp int
const (
	AddOp ArithOp = iota
	SubOp
	MulOp
	DivOp
	ModOp
	BitAndOp
	BitOrOp
	BitXorOp
	ShiftLeftLogicalOp
	ShiftRightArithmeticOp
	ShiftRightLogicalOp
)

func (ArithOp) String

func (a ArithOp) String() string

type Arithmetic

type Arithmetic struct {
	Op          ArithOp
	Left, Right Node
}

Arithmetic is a binary arithmetic expression

func Add

func Add(left, right Node) *Arithmetic

func BitAnd

func BitAnd(left, right Node) *Arithmetic

func BitOr

func BitOr(left, right Node) *Arithmetic

func BitXor

func BitXor(left, right Node) *Arithmetic

func Div

func Div(left, right Node) *Arithmetic

func Mod

func Mod(left, right Node) *Arithmetic

func Mul

func Mul(left, right Node) *Arithmetic

func NewArith

func NewArith(op ArithOp, left, right Node) *Arithmetic

NewArith generates a binary arithmetic expression.

func ShiftLeftLogical

func ShiftLeftLogical(left, right Node) *Arithmetic

func ShiftRightArithmetic

func ShiftRightArithmetic(left, right Node) *Arithmetic

func ShiftRightLogical

func ShiftRightLogical(left, right Node) *Arithmetic

func Sub

func Sub(left, right Node) *Arithmetic

func (*Arithmetic) Encode

func (a *Arithmetic) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Arithmetic) Equals

func (a *Arithmetic) Equals(x Node) bool

func (*Arithmetic) SetField

func (a *Arithmetic) SetField(f ion.Field) error

type Binding

type Binding struct {
	Expr Node
	// contains filtered or unexported fields
}

func Bind

func Bind(e Node, as string) Binding

Bind creates a binding from an expression and an output binding name

func DecodeBindings

func DecodeBindings(d ion.Datum) ([]Binding, error)

func Identity

func Identity(s string) Binding

Identity creates an identity binding from a simple identifier into itself.

func ParseBindings

func ParseBindings(str string) ([]Binding, error)

ParseBindings parses a comma-separated list of path expressions with (optional) binding parameters.

For example

a.b as b, a.x[3] as foo

is parsed into two Binding structures with the path expressions 'a.b' and 'a.x[3]'

func (*Binding) As

func (b *Binding) As(x string)

As sets the binding result of b to x. If x is the empty string, then the binding is reset to the default value for this expression.

func (Binding) Equals

func (b Binding) Equals(o Binding) bool

func (*Binding) Explicit

func (b *Binding) Explicit() bool

Explicit returns whether the variable binding is explicit, or whether the output variable is determined implicitly due to the form on the left-hand-side

func (*Binding) Result

func (b *Binding) Result() string

Result returns the name of the result that the binding outputs.

Note that Result is "" for expressions that do not have an obvious automatic name and have not had a name explicitly added via Binding.As.

type Bool

type Bool bool

func (Bool) Datum

func (b Bool) Datum() ion.Datum

func (Bool) Encode

func (b Bool) Encode(dst *ion.Buffer, st *ion.Symtab)

func (Bool) Equals

func (b Bool) Equals(e Node) bool

func (Bool) Type

func (b Bool) Type() TypeSet

type Builtin

type Builtin struct {
	Func BuiltinOp // function name
	Text string    // actual text provided to Call
	Args []Node    // function arguments
}

Builtin is a Node that represents a call to a builtin function

func Call

func Call(op BuiltinOp, args ...Node) *Builtin

Call yields op(args...).

func CallByName

func CallByName(fn string, args ...Node) *Builtin

CallByName yields 'fn(args...)' Use Call when you know the BuiltinOp associated with fn.

func (*Builtin) Encode

func (b *Builtin) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Builtin) Equals

func (b *Builtin) Equals(x Node) bool

func (*Builtin) Name

func (b *Builtin) Name() string

func (*Builtin) Private

func (b *Builtin) Private() bool

Private returns whether or not the builtin has been reserved for use by the query planner or intermediate optimizations. Private functions are illegal in user-provided input.

func (*Builtin) SetField

func (b *Builtin) SetField(f ion.Field) error

type BuiltinOp

type BuiltinOp int
const (
	// Note: names of builin functions that appear in SQL
	// are derived from the constant name. If a function
	// has non-trival const-to-name mapping or there
	// are aliases, the names are provied in the comment,
	// after "sql:" prefix.
	// See _generate/builtin_names.go
	Concat BuiltinOp = iota
	Trim
	Ltrim
	Rtrim
	Upper
	Lower
	Contains
	ContainsCI // sql:CONTAINS_CI
	EqualsCI   // sql:EQUALS_CI
	EqualsFuzzy
	EqualsFuzzyUnicode
	ContainsFuzzy
	ContainsFuzzyUnicode
	OctetLength
	CharLength // sql:CHAR_LENGTH sql:CHARACTER_LENGTH
	IsSubnetOf
	Substring
	SplitPart

	BitCount

	Abs
	Sign

	Round
	RoundEven
	Trunc
	Floor
	Ceil // sql:CEIL sql:CEILING

	Sqrt
	Cbrt
	Exp
	ExpM1 // sql:EXPM1
	Exp2
	Exp10
	Hypot
	Ln
	Ln1p // sql:LN1P
	Log
	Log2
	Log10
	Pow     // sql:POW sql:POWER
	PowUint // sql:POW_UINT

	Pi
	Degrees
	Radians
	Sin
	Cos
	Tan
	Asin
	Acos
	Atan
	Atan2

	Pmod

	Least
	Greatest
	WidthBucket

	DateAddMicrosecond
	DateAddMillisecond
	DateAddSecond
	DateAddMinute
	DateAddHour
	DateAddDay
	DateAddWeek
	DateAddMonth
	DateAddQuarter
	DateAddYear

	DateBin

	DateDiffMicrosecond
	DateDiffMillisecond
	DateDiffSecond
	DateDiffMinute
	DateDiffHour
	DateDiffDay
	DateDiffWeek
	DateDiffMonth
	DateDiffQuarter
	DateDiffYear

	DateExtractMicrosecond
	DateExtractMillisecond
	DateExtractSecond
	DateExtractMinute
	DateExtractHour
	DateExtractDay
	DateExtractDOW // sql:DATE_EXTRACT_DOW
	DateExtractDOY // sql:DATE_EXTRACT_DOY
	DateExtractMonth
	DateExtractQuarter
	DateExtractYear

	DateTruncMicrosecond
	DateTruncMillisecond
	DateTruncSecond
	DateTruncMinute
	DateTruncHour
	DateTruncDay
	DateTruncDOW // sql:DATE_TRUNC_DOW
	DateTruncMonth
	DateTruncQuarter
	DateTruncYear

	ToUnixEpoch
	ToUnixMicro

	GeoHash
	GeoTileX
	GeoTileY
	GeoTileES // sql:GEO_TILE_ES
	GeoDistance

	ObjectSize // sql:SIZE
	ArrayContains
	ArraySize
	ArrayPosition
	ArraySum

	VectorInnerProduct   // sql:INNER_PRODUCT
	VectorL1Distance     // sql:L1_DISTANCE
	VectorL2Distance     // sql:L2_DISTANCE
	VectorCosineDistance // sql:COSINE_DISTANCE

	TableGlob
	TablePattern

	// used by query planner:
	InSubquery        // matches IN (SELECT ...)
	InReplacement     // IN_REPLACEMENT(x, id)
	HashReplacement   // HASH_REPLACEMENT(id, kind, k, x)
	ScalarReplacement // SCALAR_REPLACEMENT(id)
	StructReplacement // STRUCT_REPLACEMENT(id)
	ListReplacement   // LIST_REPLACEMENT(id)

	TimeBucket

	MakeList   // MAKE_LIST(args...) constructs a list
	MakeStruct // MAKE_STRUCT(field, value, ...) constructs a structure

	TypeBit // TYPE_BIT(arg) produces the bits associated with the type of arg
	AssertIonType

	PartitionValue // PARTITION_VALUE(int) is used as a placeholder during query planning

	Unspecified // catch-all for opaque built-ins; sql:UNKNOWN

)

func (BuiltinOp) IsDateAdd

func (b BuiltinOp) IsDateAdd() bool

IsDateAdd checks whether the built-in function is `DATE_ADD_xxx`

func (BuiltinOp) IsDateDiff

func (b BuiltinOp) IsDateDiff() bool

IsDateDiff checks whether the built-in function is `DATE_DIFF_xxx`

func (BuiltinOp) IsDateExtract

func (b BuiltinOp) IsDateExtract() bool

IsDateExtract checks whether the built-in function is `EXTRACT_xxx`

func (BuiltinOp) IsDateTrunc

func (b BuiltinOp) IsDateTrunc() bool

IsDateTrunc checks whether the built-in function is `DATE_TRUNC_xxx`

func (BuiltinOp) String

func (b BuiltinOp) String() string

func (BuiltinOp) TimePart

func (b BuiltinOp) TimePart() (Timepart, bool)

TimePart returns a time part of a built-in date function

type CTE

type CTE struct {
	Table string
	As    *Select
}

CTE is one arm of a "common table expression" (i.e. WITH table AS (SELECT ...))

func (*CTE) Equals

func (c *CTE) Equals(other *CTE) bool

Equals returns true if c and other are equivalent CTE bindings, or false otherwise.

type Case

type Case struct {
	// Limbs are each of the case limbs.
	// There ought to be at least one.
	Limbs []CaseLimb
	// Else is the ELSE limb of the case
	// expression, or nil if no ELSE was specified.
	Else Node

	// Valence is a hint passed to
	// the expression-compilation code
	// regarding the result type of
	// the case expression. Some optimizations
	// make the valence of the CASE obvious.
	Valence string
}

Case represents a CASE expression.

func Coalesce

func Coalesce(nodes []Node) *Case

Coalesce turns COALESCE(args...) into an equivalent Case expression.

func (*Case) Encode

func (c *Case) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Case) Equals

func (c *Case) Equals(e Node) bool

func (*Case) IsPathLimbs

func (c *Case) IsPathLimbs() bool

IsPathLimbs returns true if the ELSE value and every THEN limb of the CASE expression is a Path expression, Null, or Missing.

func (*Case) SetField

func (c *Case) SetField(f ion.Field) error

type CaseLimb

type CaseLimb struct {
	When, Then Node
}

CaseLimb is one 'WHEN expr THEN expr' case limb.

type Cast

type Cast struct {
	// From is the expression on the left-hand-side of the CAST.
	From Node
	// To is the representation of the constant on the right-hand-side
	// of the CAST expression.
	// Typically, only one bit of the TypeSet is present, to indicate
	// the desired result type.
	To TypeSet
}

Cast represents a CAST(... AS ...) expression.

func (*Cast) Encode

func (c *Cast) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Cast) Equals

func (c *Cast) Equals(e Node) bool

func (*Cast) SetField

func (c *Cast) SetField(f ion.Field) error

func (*Cast) TargetTypeName

func (c *Cast) TargetTypeName() string

TargetTypeName returns the name of the target type.

type CmpOp

type CmpOp int

CmpOp is a comparison operation type

const (
	Equals CmpOp = iota
	NotEquals

	Less
	LessEquals
	Greater
	GreaterEquals
)

func (CmpOp) Flip

func (c CmpOp) Flip() CmpOp

Flip returns the operator that is equivalent to c if used with the operand order reversed.

func (CmpOp) Ordinal

func (c CmpOp) Ordinal() bool

func (CmpOp) String

func (c CmpOp) String() string

type Comparison

type Comparison struct {
	Op          CmpOp
	Left, Right Node
}

func (*Comparison) Encode

func (c *Comparison) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Comparison) Equals

func (c *Comparison) Equals(x Node) bool

func (*Comparison) SetField

func (c *Comparison) SetField(f ion.Field) error

func (*Comparison) Type

func (c *Comparison) Type() TypeSet

type Constant

type Constant interface {
	Node
	// Datum returns the ion Datum
	// associated with this constant.
	Datum() ion.Datum
}

Constant is a Node that is a constant value.

func AsConstant

func AsConstant(d ion.Datum) (Constant, bool)

AsConstant converts a literal ion datum into a literal PartiQL expression constant.

type Dot

type Dot struct {
	Inner Node
	Field string
}

Dot represents the '.' infix operator, i.e.

Inner '.' Field

The Inner value within Dot should be structure-typed.

func (*Dot) Encode

func (d *Dot) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Dot) Equals

func (d *Dot) Equals(x Node) bool

func (*Dot) SetField

func (d *Dot) SetField(f ion.Field) (err error)

type ExplainFormat

type ExplainFormat uint8

ExplainFormat describes the format of explain output

const (
	// ExplainNone does no explain
	ExplainNone ExplainFormat = iota

	// ExplainDefault returns singe blob of text
	ExplainDefault

	// ExplainText returns a singe blob of text
	ExplainText

	// ExplainList returns each line of plan separately
	ExplainList

	// ExplainGraphviz returns plan in graphviz format
	ExplainGraphviz
)

type Field

type Field struct {
	// Label is the label for the field
	Label string
	// Value is a value in a Struct literal
	Value Constant
}

Field is a field in a Struct literal,

type Float

type Float float64

Float is a literal float AST node

func (Float) Datum

func (f Float) Datum() ion.Datum

func (Float) Encode

func (f Float) Encode(dst *ion.Buffer, st *ion.Symtab)

func (Float) Equals

func (f Float) Equals(e Node) bool

func (Float) Type

func (f Float) Type() TypeSet

type From

type From interface {
	// Tables returns the list of
	// table bindings created in
	// the FROM clause
	Tables() []Binding
	Node
}

From represents a FROM clause

type Hint

type Hint interface {
	TypeOf(e Node) TypeSet
}

Hint is an argument that can be supplied to type-checking operations to refine the type of nodes that have types that would otherwise be unknown to the query planner.

type Ident

type Ident string

Ident is a top-level identifier

func Identifier

func Identifier(x string) Ident

Identifier produces a single-element path expression from an identifier string

func (Ident) Encode

func (i Ident) Encode(dst *ion.Buffer, st *ion.Symtab)

func (Ident) Equals

func (i Ident) Equals(x Node) bool

type Index

type Index struct {
	Inner  Node
	Offset int // offset is constant for now
}

Index represents the '[]' infix operator, i.e.

Inner '[' Offset ']'

The Inner value within Index should be list-typed.

func (*Index) Encode

func (i *Index) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Index) Equals

func (i *Index) Equals(x Node) bool

func (*Index) SetField

func (i *Index) SetField(f ion.Field) (err error)

type Integer

type Integer int64

Integer is a literal integer AST node

func (Integer) Datum

func (i Integer) Datum() ion.Datum

func (Integer) Encode

func (i Integer) Encode(dst *ion.Buffer, _ *ion.Symtab)

func (Integer) Equals

func (i Integer) Equals(e Node) bool

func (Integer) Type

func (i Integer) Type() TypeSet

type IsKey

type IsKey struct {
	Expr Node
	Key  Keyword
}

func Is

func Is(e Node, k Keyword) *IsKey

Is yields

<e> IS <k>

func (*IsKey) Encode

func (i *IsKey) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*IsKey) Equals

func (i *IsKey) Equals(x Node) bool

func (*IsKey) SetField

func (i *IsKey) SetField(f ion.Field) error

func (*IsKey) Type

func (i *IsKey) Type() TypeSet

type Join

type Join struct {
	Kind  JoinKind
	On    Node
	Left  From    // left table expression; can be another join
	Right Binding // right binding
}

Join is an implementation of From that joins a table and a subsequent From clause

func (*Join) Encode

func (j *Join) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Join) Equals

func (j *Join) Equals(x Node) bool

func (*Join) SetField

func (j *Join) SetField(f ion.Field) error

func (*Join) Tables

func (j *Join) Tables() []Binding

type JoinKind

type JoinKind int
const (
	NoJoin JoinKind = iota
	InnerJoin
	LeftJoin
	RightJoin
	FullJoin
	CrossJoin
)

func (JoinKind) String

func (j JoinKind) String() string

type Keyword

type Keyword int
const (
	IsNull Keyword = iota
	IsNotNull
	IsMissing
	IsNotMissing
	IsTrue
	IsNotTrue
	IsFalse
	IsNotFalse
)

type List

type List struct {
	Values []Constant
}

List is a literal list constant.

func (*List) Datum

func (l *List) Datum() ion.Datum

func (*List) Encode

func (l *List) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*List) Equals

func (l *List) Equals(e Node) bool

func (*List) Index

func (l *List) Index(c Constant) int

Index returns position of the first occurance of constant. Returns -1 if no element was found.

func (*List) SetField

func (l *List) SetField(f ion.Field) error

func (*List) Type

func (l *List) Type() TypeSet

type Logical

type Logical struct {
	Op          LogicalOp
	Left, Right Node
}

Logical is a Node that represents a logical expression

func And

func And(left, right Node) *Logical

And yields '<left> AND <right>'

func Between

func Between(val, lo, hi Node) *Logical

Between yields an expression equivalent to

<val> BETWEEN <lo> AND <hi>

func Or

func Or(left, right Node) *Logical

Or yields '<left> OR <right>'

func Xnor

func Xnor(left, right Node) *Logical

Xnor computes 'left XNOR right', which is equivalent to 'left = right' for boolean expressions.

func Xor

func Xor(left, right Node) *Logical

Xor computes 'left XOR right', which is equivalent to 'left <> right' for boolean expressions

func (*Logical) Encode

func (l *Logical) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Logical) Equals

func (l *Logical) Equals(x Node) bool

func (*Logical) SetField

func (l *Logical) SetField(f ion.Field) error

func (*Logical) Type

func (l *Logical) Type() TypeSet

type LogicalOp

type LogicalOp int

LogicalOp is a logical operation

const (
	OpAnd  LogicalOp = iota // A AND B
	OpOr                    // A OR B
	OpXnor                  // A XNOR B (A = B)
	OpXor                   // A XOR B (A != B)
)

func (LogicalOp) String

func (l LogicalOp) String() string

type Lookup

type Lookup struct {
	// Expr is the value to be looked up in Keys,
	// and Else is the value to be returned if
	// there is no corresponding key (or MISSING
	// if Else is nil).
	Expr, Else Node
	// Keys and Values are the corresponding
	// keys and values for the contents of the
	// lookup table.
	Keys, Values ion.Bag
}

Lookup is an associative array lookup operation against a constant table.

func (*Lookup) Encode

func (l *Lookup) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Lookup) Equals

func (l *Lookup) Equals(o Node) bool

func (*Lookup) SetField

func (l *Lookup) SetField(f ion.Field) error

type Member

type Member struct {
	Arg Node
	Set ion.Bag
}

Member is an implementation of IN that compares against a list of constant values, i.e. MEMBER(x, 3, 'foo', ['x', 1.5])

func (*Member) Encode

func (m *Member) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Member) Equals

func (m *Member) Equals(e Node) bool

func (*Member) SetField

func (m *Member) SetField(f ion.Field) error

type Missing

type Missing struct{}

Missing represents the MISSING keyword

func (Missing) Encode

func (m Missing) Encode(dst *ion.Buffer, st *ion.Symtab)

func (Missing) Equals

func (m Missing) Equals(x Node) bool

func (Missing) SetField

func (m Missing) SetField(ion.Field) error

func (Missing) Type

func (m Missing) Type() TypeSet

type Node

type Node interface {
	Printable
	// Equals returns whether this node
	// is equivalent to another node.
	// Nodes are Equal if they are
	// syntactically equivalent or correspond
	// to equal numeric values.
	Equals(Node) bool

	Encode(dst *ion.Buffer, st *ion.Symtab)
	// contains filtered or unexported methods
}

Node is an expression AST node

func BindingValues

func BindingValues(bind []Binding) []Node

BindingValues collects all of bind[*].Expr and returns them as a slice.

func Compare

func Compare(op CmpOp, left, right Node) Node

Compare generates a comparison operation of the given type and with the given arguments

func Copy

func Copy(e Node) Node

Copy returns a deep copy of e.

func DateAdd

func DateAdd(part Timepart, value, date Node) Node

func DateBinWithInterval

func DateBinWithInterval(stride int64, ts Node, origin Node) Node

func DateDiff

func DateDiff(part Timepart, timestamp1, timestamp2 Node) Node

func DateExtract

func DateExtract(part Timepart, from Node) Node

func DateTrunc

func DateTrunc(part Timepart, from Node) Node

func DateTruncWeekday

func DateTruncWeekday(from Node, dow Weekday) Node

func Decode

func Decode(d ion.Datum) (Node, error)

func IfThenElse

func IfThenElse(whenExpr, thenExpr, elseExpr Node) Node

IfThenElse ternary conditional. eg. result := (count=0) ? thenExpr : elseExpr is written as IfThenElse(Compare(Equals, count, Integer(0)), thenExpr, elseExpr)

func In

func In(val Node, cmp ...Node) Node

In yields an expression equivalent to

<val> IN (cmp ...)

func MakePath

func MakePath(path []string) Node

MakePath constructs a path expression from a list of identifier path components. This is the reverse operation of FlatPath.

func NullIf

func NullIf(a, b Node) Node

NullIf implements SQL NULLIF(a, b); it is transformed into an equivalent CASE expression:

CASE WHEN a = b THEN NULL ELSE a

func ParsePath

func ParsePath(x string) (Node, error)

ParsePath parses simple path expressions like 'a.b.z' or 'a[0].y', etc.

func Rewrite

func Rewrite(r Rewriter, n Node) Node

Rewrite recursively applies a Rewriter in depth-first order

func Simplify

func Simplify(n Node, h Hint) Node

Simplify attempts to perform some algebraic simplifications of 'n' and returns the simplified node. If no simplification can be performed, 'n' itself is returned.

func SimplifyLogic

func SimplifyLogic(n Node, h Hint) Node

SimplifyLogic is similar to Simplify, except that it performs additional simplifications assuming that the result of the expression is implicitly tested against 'IS TRUE'. (In other words, this simplifier performs optimizations that are only legal inside a WHERE clause.)

type Not

type Not struct {
	Expr Node
}

Not yields

! (Expr)

func (*Not) Encode

func (n *Not) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Not) Equals

func (n *Not) Equals(x Node) bool

func (*Not) SetField

func (n *Not) SetField(f ion.Field) error

func (*Not) Type

func (n *Not) Type() TypeSet

type Null

type Null struct{}

func (Null) Datum

func (n Null) Datum() ion.Datum

func (Null) Encode

func (n Null) Encode(dst *ion.Buffer, st *ion.Symtab)

func (Null) Equals

func (n Null) Equals(x Node) bool

func (Null) Type

func (n Null) Type() TypeSet

type Order

type Order struct {
	Column          Node
	Desc, NullsLast bool
}

func (Order) Equals

func (o Order) Equals(x Order) bool

type Printable

type Printable interface {
	// contains filtered or unexported methods
}

type Query

type Query struct {
	Explain ExplainFormat

	With []CTE
	// Into, if non-nil, is the INTO
	// portion of Body when Body is
	// a SELECT-FROM-WHERE that includes
	// an INTO clause.
	Into Node
	// Body is the body of the query.
	// Body can be:
	//   - A SELECT expression
	//   - A UNION expression
	//   - A UNION ALL expression
	Body Node
}

Query contains a complete query.

func DecodeQuery

func DecodeQuery(d ion.Datum) (*Query, error)

DecodeQuery decodes an Ion structure representing a query.

Returns query, tail of unprocessed Ion and error.

func (*Query) Check

func (q *Query) Check() error

Check checks consistency of the whole query

func (*Query) CheckHint

func (q *Query) CheckHint(h Hint) error

CheckHint checks consistency of the whole query using a hint

func (*Query) Clone

func (q *Query) Clone() *Query

Clone produces a deep copy of the query AST. See also Copy.

func (*Query) Encode

func (q *Query) Encode(dst *ion.Buffer, st *ion.Symtab)

Encode encodes a query as an Ion structure

func (*Query) Equals

func (q *Query) Equals(other *Query) bool

Equals returns true if q and other are syntactically equivalent queries, or false otherwise.

func (*Query) Redacted

func (q *Query) Redacted() string

Redacted returns the redacted query text. See also: ToRedacted

func (*Query) SetField

func (q *Query) SetField(f ion.Field) error

func (*Query) Text

func (q *Query) Text() string

Text returns the unredacted query text. See also: ToString.

NOTE: we aren't implementing fmt.Stringer here so that queries aren't unintentionally printed in unredacted form.

type Rational

type Rational big.Rat

func (*Rational) Datum

func (r *Rational) Datum() ion.Datum

func (*Rational) Encode

func (r *Rational) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Rational) Equals

func (r *Rational) Equals(e Node) bool

func (*Rational) SetField

func (r *Rational) SetField(f ion.Field) error

func (*Rational) Type

func (r *Rational) Type() TypeSet

type Rewriter

type Rewriter interface {
	// Rewrite is applied to nodes
	// in depth-first order, and each
	// node is re-written to use the
	// returned value.
	Rewrite(Node) Node

	// Walk is called during node traversal
	// and the returned Rewriter is used for
	// all the children of Node.
	// If the returned rewriter is nil,
	// then traversal does not proceed past Node.
	Walk(Node) Rewriter
}

Rewriter accepts a Node and returns a new node (or just its argument)

func LogicSimplifier

func LogicSimplifier(h Hint) Rewriter

LogicSimplifier returns a Rewriter that performs bottom-up simplification of logical expressions using the given Hint

func Simplifier

func Simplifier(h Hint) Rewriter

Simplifier returns a Rewriter that performs bottom-up simplification of expressions using the given Hint

type Select

type Select struct {
	// DISTINCT presence
	Distinct bool
	// DISTINCT ON (expressions)
	DistinctExpr []Node
	// List of output columns
	Columns []Binding
	// FROM clause
	From From
	// WHERE clause
	Where Node
	// GROUP BY clauses, or nil
	GroupBy []Binding
	// HAVING clause, or nil
	Having Node
	// ORDER BY clauses, or nil
	OrderBy []Order
	// When OrderBy is non-nil,
	// indicates the presence of PRESERVE
	Preserve bool
	// LIMIT <Integer> when non-nil
	Limit *Integer
	// OFFSET <Integer> when non-nil
	Offset *Integer
}

func (*Select) Encode

func (s *Select) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Select) Equals

func (s *Select) Equals(x Node) bool

func (*Select) HasDistinct

func (s *Select) HasDistinct() bool

HasDistinct returns if select implements 'SELECT DISTINCT ... FROM ...' or 'SELECT DISTINCT ON (...) ... FROM ...'

func (*Select) SetField

func (s *Select) SetField(f ion.Field) error

func (*Select) Tables

func (s *Select) Tables() []Binding

Tables implements From.Tables

func (*Select) Text

func (s *Select) Text() string

Text is like ToString(s), but it does not insert parentheses around the query.

type Star

type Star struct{}

Star represents the '*' path component

func (Star) Encode

func (s Star) Encode(dst *ion.Buffer, st *ion.Symtab)

func (Star) Equals

func (s Star) Equals(e Node) bool

func (Star) SetField

func (s Star) SetField(ion.Field) error

type String

type String string

String is a literal string AST node

func (String) Datum

func (s String) Datum() ion.Datum

func (String) Encode

func (s String) Encode(dst *ion.Buffer, _ *ion.Symtab)

func (String) Equals

func (s String) Equals(e Node) bool

func (String) Type

func (s String) Type() TypeSet

type StringMatch

type StringMatch struct {
	Op      StringMatchOp
	Expr    Node
	Pattern string
	Escape  string
}

StringMatch is an expression that matches an arbitrary value against a literal string pattern.

func (*StringMatch) Encode

func (s *StringMatch) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*StringMatch) Equals

func (s *StringMatch) Equals(x Node) bool

func (*StringMatch) SetField

func (s *StringMatch) SetField(f ion.Field) error

type StringMatchOp

type StringMatchOp int

StringMatchOp is one of the string-matching operations (LIKE, ILIKE, SIMILAR TO, ...)

const (
	Like          StringMatchOp = iota // LIKE <literal> (also ~~)
	Ilike                              // ILIKE <literal> (also ~~*)
	SimilarTo                          // SIMILAR TO <literal>
	RegexpMatch                        // ~ <literal>
	RegexpMatchCi                      // ~* <literal> case-insensitive regex match
)

func (StringMatchOp) String

func (s StringMatchOp) String() string

type Struct

type Struct struct {
	Fields []Field
}

Struct is a literal struct constant

func (*Struct) Datum

func (s *Struct) Datum() ion.Datum

func (*Struct) Encode

func (s *Struct) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Struct) Equals

func (s *Struct) Equals(e Node) bool

func (*Struct) FieldByName

func (s *Struct) FieldByName(f string) Constant

FieldByName returns value for given field or nil if there's no such field

func (*Struct) HasField

func (s *Struct) HasField(f string) bool

func (*Struct) SetField

func (s *Struct) SetField(f ion.Field) error

func (*Struct) Type

func (s *Struct) Type() TypeSet

type SyntaxError

type SyntaxError struct {
	At  Node
	Msg string
}

SyntaxError is the error type returned from Check when an expression has illegal syntax.

func (*SyntaxError) Error

func (s *SyntaxError) Error() string

type Table

type Table struct {
	Binding
}

Table is an implementation of From that simply binds a top-level table as a bag of values

func (*Table) Encode

func (t *Table) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Table) Equals

func (t *Table) Equals(x Node) bool

func (*Table) SetField

func (t *Table) SetField(f ion.Field) error

func (*Table) Tables

func (t *Table) Tables() []Binding

type Timepart

type Timepart int

Timepart is an identifier that references part of a timestamp

const (
	Microsecond Timepart = iota
	Millisecond
	Second
	Minute
	Hour
	Day
	DOW
	DOY
	Week
	Month
	Quarter
	Year
)

func (Timepart) String

func (t Timepart) String() string

type Timestamp

type Timestamp struct {
	Value date.Time
}

func (*Timestamp) Bin

func (t *Timestamp) Bin(stride int64, origin Timestamp) Timestamp

func (*Timestamp) Datum

func (t *Timestamp) Datum() ion.Datum

func (*Timestamp) Encode

func (t *Timestamp) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Timestamp) Equals

func (t *Timestamp) Equals(e Node) bool

func (*Timestamp) Trunc

func (t *Timestamp) Trunc(part Timepart) Timestamp

func (*Timestamp) Type

func (t *Timestamp) Type() TypeSet

func (*Timestamp) UnixMicro

func (t *Timestamp) UnixMicro() int64

type TypeError

type TypeError struct {
	At   Node
	Msg  string
	Hint string
}

TypeError is the error type returned from Check when an expression is ill-typed.

func (*TypeError) Error

func (t *TypeError) Error() string

Error implements error

type TypeSet

type TypeSet uint16

TypeSet is a set of ion types; type #15 is the MISSING type

Value expression nodes can produce their TypeSet (see TypeOf), which lets the AST checker perform some rudimentary type-checking to determine if the semantics of the operations are incompatible.

const (
	// AnyType is the TypeSet that
	// contains all types.
	AnyType     TypeSet = 0xffff
	MissingType TypeSet = (1 << 15)
	BoolType    TypeSet = (1 << ion.BoolType)
	// LogicalType is the return type
	// of logical operations
	LogicalType TypeSet = (1 << ion.BoolType) | MissingType
	// UnsignedType is the return type
	// of operations that produce only
	// unsigned integers
	UnsignedType TypeSet = (1 << ion.UintType)
	// IntegerType is the return type
	// of operations that produce only
	// signed and unsigned integers
	IntegerType TypeSet = UnsignedType | (1 << ion.IntType)
	FloatType   TypeSet = (1 << ion.FloatType)
	// NumericType is the return type
	// of number operations
	NumericType TypeSet = IntegerType | (1 << ion.FloatType)
	StringType  TypeSet = (1 << ion.StringType)
	TimeType    TypeSet = (1 << ion.TimestampType)
	ListType    TypeSet = (1 << ion.ListType)
	StructType  TypeSet = (1 << ion.StructType)
	DecimalType TypeSet = (1 << ion.DecimalType)
	SymbolType  TypeSet = (1 << ion.SymbolType)
	NullType    TypeSet = (1 << ion.NullType)
)

func TypeOf

func TypeOf(n Node, h Hint) TypeSet

TypeOf attempts to return the set of types that a node could evaluate to at runtime.

func (TypeSet) AnyOf

func (t TypeSet) AnyOf(set TypeSet) bool

func (TypeSet) Comparable

func (t TypeSet) Comparable(other TypeSet) bool

Comparable returns whether or not two values can be compared against one another under ordinary typing rules

func (TypeSet) Contains

func (t TypeSet) Contains(it ion.Type) bool

Contains returns whether or not a TypeSet contains a particular ion type

func (TypeSet) Logical

func (t TypeSet) Logical() bool

Logical returns whether or not the type set includes the boolean type (in other words, whether it is sensible to use this type in a logical expression)

func (TypeSet) MaybeMissing

func (t TypeSet) MaybeMissing() bool

MaybeMissing returns whether or not the type set includes the MISSING value

func (TypeSet) Only

func (t TypeSet) Only(set TypeSet) bool

Only returns whether or not t contains only the types in set. (In other words, Only computes whether or not the intersection of t and set is equal to t.)

func (TypeSet) String

func (t TypeSet) String() string

type UnaryArith

type UnaryArith struct {
	Op    UnaryArithOp
	Child Node
}

func BitNot

func BitNot(child Node) *UnaryArith

func Neg

func Neg(child Node) *UnaryArith

func NewUnaryArith

func NewUnaryArith(op UnaryArithOp, child Node) *UnaryArith

func (*UnaryArith) Encode

func (u *UnaryArith) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*UnaryArith) Equals

func (u *UnaryArith) Equals(x Node) bool

func (*UnaryArith) SetField

func (u *UnaryArith) SetField(f ion.Field) error

type UnaryArithOp

type UnaryArithOp int

UnaryArithOp is one of the unary arithmetic ops (unary negation, trunc, floor, etc.)

const (
	NegOp UnaryArithOp = iota
	BitNotOp
)

type Union

type Union struct {
	Type  UnionType
	Left  Node
	Right Node
}

Union describes a single pair of expressions connected by UNION keyword

func (*Union) Encode

func (u *Union) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Union) Equals

func (u *Union) Equals(n Node) bool

func (*Union) SetField

func (u *Union) SetField(f ion.Field) error

type UnionType

type UnionType uint8

UnionType describes type of union expression

const (
	// UNION without duplicates
	UnionDistinct UnionType = iota

	// UNION with duplicates
	UnionAll
)

func (UnionType) String

func (t UnionType) String() string

type Unpivot

type Unpivot struct {
	TupleRef Node    // t
	As       *string // v
	At       *string // a
}

Unpivot captures the UNPIVOT t AS v AT a statement

func (*Unpivot) Encode

func (u *Unpivot) Encode(dst *ion.Buffer, st *ion.Symtab)

func (*Unpivot) Equals

func (u *Unpivot) Equals(brhs Node) bool

func (*Unpivot) SetField

func (u *Unpivot) SetField(f ion.Field) error

type Visitor

type Visitor interface {
	Visit(Node) Visitor
}

Visitor is an interface that must be satisfied by the argument to Visit.

A Visitor's Visit method is invoked for each node encountered by Walk. If the result visitor w is not nil, Walk visits each of the children of node with the visitor w, followed by a call of w.Visit(nil).

(see also: ast.Visitor)

type WalkFunc

type WalkFunc func(Node) bool

func (WalkFunc) Visit

func (w WalkFunc) Visit(e Node) Visitor

type Weekday

type Weekday int

Weekday identifies a day of week starting from Sunday (0) to Saturday (6)

const (
	Sunday Weekday = iota
	Monday
	Tuesday
	Wednesday
	Thursday
	Friday
	Saturday
)

func (Weekday) String

func (w Weekday) String() string

type Window

type Window struct {
	PartitionBy []Node
	OrderBy     []Order
}

Window is a window function call

Directories

Path Synopsis
Package partiql implements a SQL-compatible (and somewhat PartiQL-compatible) query text parser.
Package partiql implements a SQL-compatible (and somewhat PartiQL-compatible) query text parser.

Jump to

Keyboard shortcuts

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