expression

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Array

type Array struct {
	// contains filtered or unexported fields
}

Array represents an ARRAY[...] expression.

func NewArray

func NewArray(coercedType sql.Type) (*Array, error)

NewArray returns a new *Array.

func (*Array) Children

func (array *Array) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*Array) Eval

func (array *Array) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*Array) IsNullable

func (array *Array) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*Array) Resolved

func (array *Array) Resolved() bool

Resolved implements the sql.Expression interface.

func (*Array) String

func (array *Array) String() string

String implements the sql.Expression interface.

func (*Array) Type

func (array *Array) Type() sql.Type

Type implements the sql.Expression interface.

func (*Array) WithChildren

func (array *Array) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*Array) WithResolvedChildren

func (array *Array) WithResolvedChildren(children []any) (any, error)

WithResolvedChildren implements the vitess.InjectableExpression interface.

type BinaryOperator added in v0.5.0

type BinaryOperator struct {
	// contains filtered or unexported fields
}

BinaryOperator represents a VALUE OPERATOR VALUE expression.

func NewBinaryOperator added in v0.5.0

func NewBinaryOperator(operator framework.Operator) *BinaryOperator

NewBinaryOperator returns a new *BinaryOperator.

func (*BinaryOperator) Children added in v0.5.0

func (b *BinaryOperator) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*BinaryOperator) Eval added in v0.5.0

func (b *BinaryOperator) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*BinaryOperator) IsNullable added in v0.5.0

func (b *BinaryOperator) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*BinaryOperator) Left added in v0.5.0

func (b *BinaryOperator) Left() sql.Expression

Left implements the expression.BinaryExpression interface.

func (*BinaryOperator) Resolved added in v0.5.0

func (b *BinaryOperator) Resolved() bool

Resolved implements the sql.Expression interface.

func (*BinaryOperator) Right added in v0.5.0

func (b *BinaryOperator) Right() sql.Expression

Right implements the expression.BinaryExpression interface.

func (*BinaryOperator) String added in v0.5.0

func (b *BinaryOperator) String() string

String implements the sql.Expression interface.

func (*BinaryOperator) Type added in v0.5.0

func (b *BinaryOperator) Type() sql.Type

Type implements the sql.Expression interface.

func (*BinaryOperator) WithChildren added in v0.5.0

func (b *BinaryOperator) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*BinaryOperator) WithResolvedChildren added in v0.5.0

func (b *BinaryOperator) WithResolvedChildren(children []any) (any, error)

WithResolvedChildren implements the vitess.InjectableExpression interface.

type Cast added in v0.5.0

type Cast struct {
	// contains filtered or unexported fields
}

Cast represents a VALUE::TYPE expression.

func NewCast added in v0.5.0

func NewCast(castToType sql.Type) (*Cast, error)

NewCast returns a new *Cast.

func (*Cast) Child added in v0.5.0

func (c *Cast) Child() sql.Expression

Child returns the child that is being cast.

func (*Cast) Children added in v0.5.0

func (c *Cast) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*Cast) Eval added in v0.5.0

func (c *Cast) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*Cast) IsNullable added in v0.5.0

func (c *Cast) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*Cast) Resolved added in v0.5.0

func (c *Cast) Resolved() bool

Resolved implements the sql.Expression interface.

func (*Cast) String added in v0.5.0

func (c *Cast) String() string

String implements the sql.Expression interface.

func (*Cast) Type added in v0.5.0

func (c *Cast) Type() sql.Type

Type implements the sql.Expression interface.

func (*Cast) WithChildren added in v0.5.0

func (c *Cast) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*Cast) WithResolvedChildren added in v0.5.0

func (c *Cast) WithResolvedChildren(children []any) (any, error)

WithResolvedChildren implements the vitess.InjectableExpression interface.

type Literal added in v0.5.0

type Literal struct {
	// contains filtered or unexported fields
}

Literal represents a raw literal (number, string, etc.).

func NewBoolLiteral added in v0.6.0

func NewBoolLiteral(val bool) *Literal

NewBoolLiteral returns a new *Literal containing a boolean value.

func NewIntegerLiteral added in v0.5.0

func NewIntegerLiteral(integerValue string) (*Literal, error)

NewIntegerLiteral returns a new *Literal containing an integer (INT2/4/8 or NUMERIC) value.

func NewNumericLiteral added in v0.6.0

func NewNumericLiteral(numericValue string) (*Literal, error)

NewNumericLiteral returns a new *Literal containing a NUMERIC value.

func NewStringLiteral added in v0.5.0

func NewStringLiteral(stringValue string) (*Literal, error)

NewStringLiteral returns a new *Literal containing a TEXT value.

func (*Literal) Children added in v0.5.0

func (l *Literal) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*Literal) ConformsToLiteralInterface added in v0.5.0

func (l *Literal) ConformsToLiteralInterface()

ConformsToLiteralInterface implements the framework.LiteralInterface interface.

func (*Literal) Eval added in v0.5.0

func (l *Literal) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*Literal) GetDoltgresType added in v0.5.0

func (l *Literal) GetDoltgresType() pgtypes.DoltgresType

GetDoltgresType implements the framework.LiteralInterface interface.

func (*Literal) IsNullable added in v0.5.0

func (l *Literal) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*Literal) Resolved added in v0.5.0

func (l *Literal) Resolved() bool

Resolved implements the sql.Expression interface.

func (*Literal) String added in v0.5.0

func (l *Literal) String() string

String implements the sql.Expression interface.

func (*Literal) ToVitessLiteral added in v0.5.0

func (l *Literal) ToVitessLiteral() *vitess.SQLVal

ToVitessLiteral returns the literal as a Vitess literal. This is strictly for situations where GMS is hardcoded to expect a Vitess literal. This should only be used as a temporary measure, as the GMS code needs to be updated, or the equivalent functionality should be built into Doltgres (recommend the second approach).

func (*Literal) Type added in v0.5.0

func (l *Literal) Type() sql.Type

Type implements the sql.Expression interface.

func (*Literal) Value added in v0.5.0

func (l *Literal) Value() any

Value returns the literal value.

func (*Literal) WithChildren added in v0.5.0

func (l *Literal) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*Literal) WithResolvedChildren added in v0.5.0

func (l *Literal) WithResolvedChildren(children []any) (any, error)

WithResolvedChildren implements the vitess.InjectableExpression interface.

type UnaryOperator added in v0.5.0

type UnaryOperator struct {
	// contains filtered or unexported fields
}

UnaryOperator represents a VALUE OPERATOR VALUE expression.

func NewUnaryOperator added in v0.5.0

func NewUnaryOperator(operator framework.Operator) *UnaryOperator

NewUnaryOperator returns a new *UnaryOperator.

func (*UnaryOperator) Children added in v0.5.0

func (b *UnaryOperator) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*UnaryOperator) Eval added in v0.5.0

func (b *UnaryOperator) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*UnaryOperator) IsNullable added in v0.5.0

func (b *UnaryOperator) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*UnaryOperator) Resolved added in v0.5.0

func (b *UnaryOperator) Resolved() bool

Resolved implements the sql.Expression interface.

func (*UnaryOperator) String added in v0.5.0

func (b *UnaryOperator) String() string

String implements the sql.Expression interface.

func (*UnaryOperator) Type added in v0.5.0

func (b *UnaryOperator) Type() sql.Type

Type implements the sql.Expression interface.

func (*UnaryOperator) WithChildren added in v0.5.0

func (b *UnaryOperator) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*UnaryOperator) WithResolvedChildren added in v0.5.0

func (b *UnaryOperator) WithResolvedChildren(children []any) (any, error)

WithResolvedChildren implements the vitess.InjectableExpression interface.

Jump to

Keyboard shortcuts

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