fixidx

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFieldMissing = errors.NewKind("field %q is not on schema")

ErrFieldMissing is returned when the field is not on the schema.

Functions

func FixFieldIndexes

func FixFieldIndexes(scope *plan.Scope, logFn func(string, ...any), schema sql.Schema, exp sql.Expression) (sql.Expression, transform.TreeIdentity, error)

FixFieldIndexes transforms the given expression by correcting the indexes of columns in GetField expressions, according to the schema given. Used when combining multiple tables together into a single join result, or when otherwise changing / combining schemas in the node tree.

func FixFieldIndexesForExpressions

func FixFieldIndexesForExpressions(ctx *sql.Context, logFn func(string, ...any), node sql.Node, scope *plan.Scope) (sql.Node, transform.TreeIdentity, error)

FixFieldIndexesForExpressions transforms the expressions in the Node given, fixing the field indexes.

func FixFieldIndexesForNode

func FixFieldIndexesForNode(ctx *sql.Context, logFn func(string, ...any), scope *plan.Scope, n sql.Node) (sql.Node, transform.TreeIdentity, error)

func FixFieldIndexesForTableNode

func FixFieldIndexesForTableNode(ctx *sql.Context, logFn func(string, ...any), node sql.Node, scope *plan.Scope) (sql.Node, transform.TreeIdentity, error)

FixFieldIndexesForTableNode transforms the expressions in the Node given, fixing the field indexes. This is useful for Table nodes that have expressions but no children.

func FixFieldIndexesOnExpressions

func FixFieldIndexesOnExpressions(scope *plan.Scope, logFn func(string, ...any), schema sql.Schema, expressions ...sql.Expression) ([]sql.Expression, transform.TreeIdentity, error)

FixFieldIndexesOnExpressions executes FixFieldIndexes on a list of exprs.

func Schemas

func Schemas(nodes []sql.Node) sql.Schema

Schemas returns the Schemas for the nodes given appended in to a single one

Types

This section is empty.

Jump to

Keyboard shortcuts

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