expression

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIntegerLiteral added in v0.5.0

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

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

func NewIntervalLiteral added in v0.11.0

func NewIntervalLiteral(duration duration.Duration) *expression.Literal

NewIntervalLiteral returns a new *expression.Literal containing a INTERVAL value.

func NewJSONLiteral added in v0.8.0

func NewJSONLiteral(jsonValue string) *expression.Literal

NewJSONLiteral returns a new *expression.Literal containing a JSON value. This is different from JSONB.

func NewNullLiteral added in v0.7.5

func NewNullLiteral() *expression.Literal

NewNullLiteral returns a new *expression.Literal containing a null value.

func NewNumericLiteral added in v0.6.0

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

NewNumericLiteral returns a new *expression.Literal containing a NUMERIC value.

func NewRawLiteralBool added in v0.7.5

func NewRawLiteralBool(val bool) *expression.Literal

NewRawLiteralBool returns a new *expression.Literal containing a boolean value.

func NewRawLiteralDate added in v0.13.0

func NewRawLiteralDate(date time.Time) *expression.Literal

NewRawLiteralDate returns a new *expression.Literal containing a DATE value.

func NewRawLiteralFloat32 added in v0.16.0

func NewRawLiteralFloat32(val float32) *expression.Literal

NewRawLiteralFloat32 returns a new *expression.Literal containing a float32 value.

func NewRawLiteralFloat64 added in v0.7.5

func NewRawLiteralFloat64(val float64) *expression.Literal

NewRawLiteralFloat64 returns a new *expression.Literal containing a float64 value.

func NewRawLiteralInt32 added in v0.16.0

func NewRawLiteralInt32(val int32) *expression.Literal

NewRawLiteralInt32 returns a new *expression.Literal containing an int32 value.

func NewRawLiteralInt64 added in v0.7.5

func NewRawLiteralInt64(val int64) *expression.Literal

NewRawLiteralInt64 returns a new *expression.Literal containing an int64 value.

func NewRawLiteralJSON added in v0.13.0

func NewRawLiteralJSON(val string) *expression.Literal

NewRawLiteralJSON returns a new *expression.Literal containing a JSON value.

func NewRawLiteralNumeric added in v0.7.5

func NewRawLiteralNumeric(val *apd.Decimal) *expression.Literal

NewRawLiteralNumeric returns a new *expression.Literal containing an *apd.Decimal value.

func NewRawLiteralOid added in v0.13.0

func NewRawLiteralOid(val id.Id) *expression.Literal

NewRawLiteralOid returns a new *expression.Literal containing a OID value.

func NewRawLiteralTime added in v0.13.0

func NewRawLiteralTime(t timeofday.TimeOfDay) *expression.Literal

NewRawLiteralTime returns a new *expression.Literal containing a TIME value.

func NewRawLiteralTimeTZ added in v0.13.0

func NewRawLiteralTimeTZ(ttz timetz.TimeTZ) *expression.Literal

NewRawLiteralTimeTZ returns a new *expression.Literal containing a TIMETZ value.

func NewRawLiteralTimestamp added in v0.7.5

func NewRawLiteralTimestamp(val time.Time) *expression.Literal

NewRawLiteralTimestamp returns a new *expression.Literal containing a TIMESTAMP value. This is the variant without a time zone.

func NewRawLiteralTimestampTZ added in v0.13.0

func NewRawLiteralTimestampTZ(val time.Time) *expression.Literal

NewRawLiteralTimestampTZ returns a new *expression.Literal containing a TIMESTAMPTZ value. This is the variant with a time zone.

func NewRawLiteralUuid added in v0.13.0

func NewRawLiteralUuid(val uuid.UUID) *expression.Literal

NewRawLiteralUuid returns a new *expression.Literal containing a UUID value.

func NewTableToComposite added in v0.54.6

func NewTableToComposite(ctx *sql.Context, tableName string, fields []sql.Expression, tblSch []*sql.Column) (sql.Expression, error)

NewTableToComposite creates a new composite table type.

func NewTextLiteral added in v0.11.1

func NewTextLiteral(stringValue string) *expression.Literal

NewTextLiteral returns a new *expression.Literal containing a TEXT type value. This should be used for internal uses when the type of the value is certain.

func NewUnknownLiteral added in v0.11.1

func NewUnknownLiteral(stringValue string) *expression.Literal

NewUnknownLiteral returns a new *expression.Literal containing a UNKNOWN type value.

func NewUnsafeLiteral added in v0.11.0

func NewUnsafeLiteral(val any, t *pgtypes.DoltgresType) *expression.Literal

NewUnsafeLiteral returns a new *expression.Literal containing the given value and type. This should almost never be used, as it does not perform any checking and circumvents type safety, which may lead to hard-to-debug errors. This is currently only used within the analyzer, and will likely be removed in the future.

func ToVitessLiteral added in v0.50.1

func ToVitessLiteral(l *expression.Literal) *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 UnwrapBindVar added in v1.3.0

func UnwrapBindVar(expr sql.Expression) *expression.BindVar

UnwrapBindVar returns the underlying *expression.BindVar if expr is a bind variable, or an Alias wrapping one.

Types

type AnyExpr added in v0.11.0

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

AnyExpr represents the ANY/SOME/ALL expression. ANY and SOME are synonyms (true if at least one comparison is true); ALL additionally requires every comparison to be true, which the eval methods handle via an isAll flag derived from name rather than as a separate type, since the two share all other resolution/traversal logic.

func NewAllExpr added in v0.57.3

func NewAllExpr(subOperator string) *AnyExpr

NewAllExpr creates a new AnyExpr expression for ALL. Unlike ANY/SOME (which are synonyms for "at least one comparison is true"), ALL requires every comparison to be true; see the isAll branches in AnyExpr's eval methods.

func NewAnyExpr added in v0.11.0

func NewAnyExpr(subOperator string) *AnyExpr

NewAnyExpr creates a new AnyExpr expression.

func NewSomeExpr added in v0.11.0

func NewSomeExpr(subOperator string) *AnyExpr

NewSomeExpr creates a new AnyExpr expression for SOME. SOME is synonymous with ANY.

func (*AnyExpr) Children added in v0.11.0

func (a *AnyExpr) Children() []sql.Expression

Children implements the Expression interface.

func (*AnyExpr) DebugString added in v0.11.0

func (a *AnyExpr) DebugString(ctx *sql.Context) string

DebugString implements the Expression interface.

func (*AnyExpr) Eval added in v0.11.0

func (a *AnyExpr) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*AnyExpr) IsNullable added in v0.11.0

func (a *AnyExpr) IsNullable(ctx *sql.Context) bool

IsNullable implements the Expression interface.

func (*AnyExpr) Resolved added in v0.11.0

func (a *AnyExpr) Resolved() bool

Resolved implements the Expression interface.

func (*AnyExpr) String added in v0.11.0

func (a *AnyExpr) String() string

func (*AnyExpr) Type added in v0.11.0

func (a *AnyExpr) Type(ctx *sql.Context) sql.Type

Type implements the Expression interface.

func (*AnyExpr) WithChildren added in v0.11.0

func (a *AnyExpr) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

func (*AnyExpr) WithResolvedChildren added in v0.11.0

func (a *AnyExpr) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the Expression interface.

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 sql.Expression.

func (*Array) Eval

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

Eval implements sql.Expression.

func (*Array) IsNullable

func (array *Array) IsNullable(ctx *sql.Context) bool

IsNullable implements sql.Expression.

func (*Array) Resolved

func (array *Array) Resolved() bool

Resolved implements sql.Expression.

func (*Array) String

func (array *Array) String() string

String implements sql.Expression.

func (*Array) Type

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

Type implements sql.Expression.

func (*Array) WithChildren

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

WithChildren implements sql.Expression.

func (*Array) WithResolvedChildren

func (array *Array) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements vitess.Injectable.

type ArrayAgg added in v0.51.0

type ArrayAgg struct {
	Distinct bool
	// contains filtered or unexported fields
}

func (*ArrayAgg) Children added in v0.51.0

func (a *ArrayAgg) Children() []sql.Expression

Children implements sql.Expression

func (*ArrayAgg) Eval added in v0.51.0

func (a *ArrayAgg) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression

func (*ArrayAgg) Id added in v0.51.0

func (a *ArrayAgg) Id() sql.ColumnId

Id implements sql.IdExpression

func (*ArrayAgg) IsNullable added in v0.51.0

func (a *ArrayAgg) IsNullable(ctx *sql.Context) bool

IsNullable implements sql.Expression

func (*ArrayAgg) NewBuffer added in v0.51.0

func (a *ArrayAgg) NewBuffer(ctx *sql.Context) (sql.AggregationBuffer, error)

NewBuffer implements sql.Aggregation

func (*ArrayAgg) NewWindowFunction added in v0.51.0

func (a *ArrayAgg) NewWindowFunction(ctx *sql.Context) (sql.WindowFunction, error)

NewWindowFunction implements sql.WindowAdaptableExpression

func (*ArrayAgg) OutputExpressions added in v0.51.0

func (a *ArrayAgg) OutputExpressions() []sql.Expression

func (*ArrayAgg) Resolved added in v0.51.0

func (a *ArrayAgg) Resolved() bool

Resolved implements sql.Expression

func (*ArrayAgg) String added in v0.51.0

func (a *ArrayAgg) String() string

String implements sql.Expression

func (*ArrayAgg) Type added in v0.51.0

func (a *ArrayAgg) Type(ctx *sql.Context) sql.Type

Type implements sql.Expression

func (*ArrayAgg) Window added in v0.51.0

func (a *ArrayAgg) Window() *sql.WindowDefinition

Window implements sql.WindowAdaptableExpression

func (ArrayAgg) WithChildren added in v0.51.0

func (a ArrayAgg) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression

func (ArrayAgg) WithId added in v0.51.0

func (a ArrayAgg) WithId(id sql.ColumnId) sql.IdExpression

WithId implements sql.IdExpression

func (*ArrayAgg) WithResolvedChildren added in v0.51.0

func (a *ArrayAgg) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren returns a new ArrayAgg with the provided children as its select expressions. The last child is expected to be the order by expressions.

func (*ArrayAgg) WithWindow added in v0.51.0

func (a *ArrayAgg) WithWindow(ctx *sql.Context, window *sql.WindowDefinition) sql.WindowAdaptableExpression

WithWindow implements sql.WindowAdaptableExpression

type ArrayFlatten added in v0.50.0

type ArrayFlatten struct {
	Subquery sql.Expression
}

ArrayFlatten is an expression that represents the results of a subquery expression as an array. Currently only subqueries that return a single column are supported.

func (ArrayFlatten) Children added in v0.50.0

func (a ArrayFlatten) Children() []sql.Expression

Children implements sql.Expression.

func (ArrayFlatten) Eval added in v0.50.0

func (a ArrayFlatten) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression.

func (ArrayFlatten) IsNullable added in v0.50.0

func (a ArrayFlatten) IsNullable(ctx *sql.Context) bool

IsNullable implements sql.Expression.

func (ArrayFlatten) Resolved added in v0.50.0

func (a ArrayFlatten) Resolved() bool

Resolved implements sql.Expression.

func (ArrayFlatten) String added in v0.50.0

func (a ArrayFlatten) String() string

String implements sql.Expression.

func (ArrayFlatten) Type added in v0.50.0

func (a ArrayFlatten) Type(ctx *sql.Context) sql.Type

Type implements sql.Expression.

func (ArrayFlatten) WithChildren added in v0.50.0

func (a ArrayFlatten) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression.

func (ArrayFlatten) WithResolvedChildren added in v0.50.0

func (a ArrayFlatten) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements vitess.Injectable.

type AssignmentCast added in v0.8.0

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

AssignmentCast handles assignment casts.

func NewAssignmentCast added in v0.8.0

func NewAssignmentCast(expr sql.Expression, sourceType *pgtypes.DoltgresType, targetType *pgtypes.DoltgresType) *AssignmentCast

NewAssignmentCast returns a new *AssignmentCast expression.

func (*AssignmentCast) Children added in v0.8.0

func (ac *AssignmentCast) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*AssignmentCast) Eval added in v0.8.0

func (ac *AssignmentCast) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*AssignmentCast) IsNullable added in v0.8.0

func (ac *AssignmentCast) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*AssignmentCast) Resolved added in v0.8.0

func (ac *AssignmentCast) Resolved() bool

Resolved implements the sql.Expression interface.

func (*AssignmentCast) String added in v0.8.0

func (ac *AssignmentCast) String() string

String implements the sql.Expression interface.

func (*AssignmentCast) Type added in v0.8.0

func (ac *AssignmentCast) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*AssignmentCast) WithChildren added in v0.8.0

func (ac *AssignmentCast) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression 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) DistanceMetric added in v1.3.0

func (b *BinaryOperator) DistanceMetric() sql.DistanceType

DistanceMetric implements the vector.OrderableDistance 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) IndexScanOperation added in v0.52.0

func (b *BinaryOperator) IndexScanOperation() (sql.IndexScanOp, sql.Expression, sql.Expression, bool)

IndexScanOperation implements the sql.IndexComparisonExpression interface.

func (*BinaryOperator) IsNullable added in v0.5.0

func (b *BinaryOperator) IsNullable(ctx *sql.Context) 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) Operator added in v0.10.0

func (b *BinaryOperator) Operator() framework.Operator

Operator returns the operator that is used.

func (*BinaryOperator) RepresentsEquality added in v0.12.0

func (b *BinaryOperator) RepresentsEquality() bool

RepresentsEquality implements the expression.Equality 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) SetStatementRunner added in v1.2.0

func (b *BinaryOperator) SetStatementRunner(ctx *sql.Context, runner sql.StatementRunner) sql.Expression

SetStatementRunner implements the procedures.InterpreterExpr interface.

func (*BinaryOperator) String added in v0.5.0

func (b *BinaryOperator) String() string

String implements the sql.Expression interface.

func (*BinaryOperator) SwapParameters added in v0.12.0

func (b *BinaryOperator) SwapParameters(ctx *sql.Context) (expression.Equality, error)

SwapParameters implements the expression.Equality interface.

func (*BinaryOperator) TargetAndQuery added in v1.3.0

func (b *BinaryOperator) TargetAndQuery() (sql.Expression, sql.Expression, bool)

TargetAndQuery implements the vector.OrderableDistance interface.

func (*BinaryOperator) ToComparer added in v0.12.0

func (b *BinaryOperator) ToComparer(ctx *sql.Context) (expression.Comparer, error)

ToComparer implements the expression.Equality interface.

func (*BinaryOperator) Type added in v0.5.0

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

Type implements the sql.Expression interface.

func (*BinaryOperator) WithChildren added in v0.5.0

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

WithChildren implements the sql.Expression interface.

func (*BinaryOperator) WithResolvedChildren added in v0.5.0

func (b *BinaryOperator) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.InjectableExpression interface.

type ColumnAccess added in v0.55.0

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

ColumnAccess represents an ARRAY[...] expression.

func NewColumnAccess added in v0.55.0

func NewColumnAccess(colName string, colIdx int) (*ColumnAccess, error)

NewColumnAccess returns a new *ColumnAccess.

func (*ColumnAccess) Children added in v0.55.0

func (expr *ColumnAccess) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*ColumnAccess) Eval added in v0.55.0

func (expr *ColumnAccess) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*ColumnAccess) IsNullable added in v0.55.0

func (expr *ColumnAccess) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*ColumnAccess) Resolved added in v0.55.0

func (expr *ColumnAccess) Resolved() bool

Resolved implements the sql.Expression interface.

func (*ColumnAccess) String added in v0.55.0

func (expr *ColumnAccess) String() string

String implements the sql.Expression interface.

func (*ColumnAccess) Type added in v0.55.0

func (expr *ColumnAccess) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*ColumnAccess) WithChildren added in v0.55.0

func (expr *ColumnAccess) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*ColumnAccess) WithResolvedChildren added in v0.55.0

func (expr *ColumnAccess) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.InjectableExpression interface.

func (*ColumnAccess) WithType added in v0.55.0

func (expr *ColumnAccess) WithType(typ *pgtypes.DoltgresType) sql.Expression

WithType returns this expression with the given type set, as it must be set within the analyzer.

type ExplicitCast added in v0.8.0

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

ExplicitCast represents a VALUE::TYPE expression.

func NewExplicitCast added in v0.8.0

func NewExplicitCast(expr sql.Expression, toType *pgtypes.DoltgresType) *ExplicitCast

NewExplicitCast returns a new *ExplicitCast expression.

func NewExplicitCastInjectable added in v0.10.0

func NewExplicitCastInjectable(castToType sql.Type) (*ExplicitCast, error)

NewExplicitCastInjectable returns an incomplete *ExplicitCast that must be resolved through the vitess.Injectable interface.

func (*ExplicitCast) Child added in v0.8.0

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

Child returns the child that is being cast.

func (*ExplicitCast) Children added in v0.8.0

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

Children implements the sql.Expression interface.

func (*ExplicitCast) Eval added in v0.8.0

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

Eval implements the sql.Expression interface.

func (*ExplicitCast) IsNullable added in v0.8.0

func (c *ExplicitCast) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*ExplicitCast) Resolved added in v0.8.0

func (c *ExplicitCast) Resolved() bool

Resolved implements the sql.Expression interface.

func (*ExplicitCast) String added in v0.8.0

func (c *ExplicitCast) String() string

String implements the sql.Expression interface.

func (*ExplicitCast) Type added in v0.8.0

func (c *ExplicitCast) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*ExplicitCast) WithCastToType added in v0.16.0

func (c *ExplicitCast) WithCastToType(t *pgtypes.DoltgresType) sql.Expression

WithCastToType returns a copy of the expression with castToType replaced.

func (*ExplicitCast) WithChildren added in v0.8.0

func (c *ExplicitCast) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*ExplicitCast) WithDomainConstraints added in v0.16.0

func (c *ExplicitCast) WithDomainConstraints(nullable bool, checks sql.CheckConstraints) sql.Expression

WithDomainConstraints returns a copy of the expression with domain constraints defined.

func (*ExplicitCast) WithResolvedChildren added in v0.8.0

func (c *ExplicitCast) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.InjectableExpression interface.

type GMSCast added in v0.8.0

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

GMSCast handles the conversion from a GMS expression's type to its Doltgres type that is most similar.

func NewGMSCast added in v0.8.0

func NewGMSCast(child sql.Expression) *GMSCast

NewGMSCast returns a new *GMSCast.

func (*GMSCast) Child added in v0.8.0

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

Child returns the child that is being cast.

func (*GMSCast) Children added in v0.8.0

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

Children implements the sql.Expression interface.

func (*GMSCast) DoltgresType added in v0.8.0

func (c *GMSCast) DoltgresType(ctx *sql.Context) *pgtypes.DoltgresType

DoltgresType returns the DoltgresType that the cast evaluates to. This is the same value that is returned by Type().

func (*GMSCast) Eval added in v0.8.0

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

Eval implements the sql.Expression interface.

func (*GMSCast) IsNullable added in v0.8.0

func (c *GMSCast) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*GMSCast) Resolved added in v0.8.0

func (c *GMSCast) Resolved() bool

Resolved implements the sql.Expression interface.

func (*GMSCast) String added in v0.8.0

func (c *GMSCast) String() string

String implements the sql.Expression interface.

func (*GMSCast) Type added in v0.8.0

func (c *GMSCast) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*GMSCast) WithChildren added in v0.8.0

func (c *GMSCast) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

type Greatest added in v0.57.1

type Greatest struct {
	Args []sql.Expression
	// contains filtered or unexported fields
}

Greatest represents a GREATEST expression.

func (*Greatest) Children added in v0.57.1

func (n *Greatest) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*Greatest) Eval added in v0.57.1

func (n *Greatest) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*Greatest) IsNullable added in v0.57.1

func (n *Greatest) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*Greatest) Resolved added in v0.57.1

func (n *Greatest) Resolved() bool

Resolved implements the sql.Expression interface.

func (*Greatest) String added in v0.57.1

func (n *Greatest) String() string

String implements the sql.Expression interface.

func (*Greatest) Type added in v0.57.1

func (n *Greatest) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*Greatest) WithChildren added in v0.57.1

func (n *Greatest) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*Greatest) WithResolvedChildren added in v0.57.1

func (n *Greatest) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.InjectableExpression interface.

type ImplicitCast added in v0.8.0

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

ImplicitCast handles implicit casts.

func NewImplicitCast added in v0.8.0

func NewImplicitCast(expr sql.Expression, fromType *pgtypes.DoltgresType, toType *pgtypes.DoltgresType) *ImplicitCast

NewImplicitCast returns a new *ImplicitCast expression.

func (*ImplicitCast) Children added in v0.8.0

func (ic *ImplicitCast) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*ImplicitCast) Eval added in v0.8.0

func (ic *ImplicitCast) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*ImplicitCast) IsNullable added in v0.8.0

func (ic *ImplicitCast) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*ImplicitCast) Resolved added in v0.8.0

func (ic *ImplicitCast) Resolved() bool

Resolved implements the sql.Expression interface.

func (*ImplicitCast) String added in v0.8.0

func (ic *ImplicitCast) String() string

String implements the sql.Expression interface.

func (*ImplicitCast) Type added in v0.8.0

func (ic *ImplicitCast) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*ImplicitCast) WithChildren added in v0.8.0

func (ic *ImplicitCast) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

type InSubquery added in v0.11.1

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

InSubquery represents a VALUE IN (SELECT ...) expression.

func NewInSubquery added in v0.11.1

func NewInSubquery() *InSubquery

NewInSubquery returns a new *InSubquery.

func (*InSubquery) Children added in v0.11.1

func (in *InSubquery) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*InSubquery) Eval added in v0.11.1

func (in *InSubquery) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*InSubquery) IsNullable added in v0.11.1

func (in *InSubquery) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*InSubquery) Left added in v0.11.1

func (in *InSubquery) Left() sql.Expression

Left implements the expression.BinaryExpression interface.

func (*InSubquery) Resolved added in v0.11.1

func (in *InSubquery) Resolved() bool

Resolved implements the sql.Expression interface.

func (*InSubquery) Right added in v0.11.1

func (in *InSubquery) Right() sql.Expression

Right implements the expression.BinaryExpression interface.

func (*InSubquery) String added in v0.11.1

func (in *InSubquery) String() string

String implements the sql.Expression interface.

func (*InSubquery) Type added in v0.11.1

func (in *InSubquery) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*InSubquery) WithChildren added in v0.11.1

func (in *InSubquery) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*InSubquery) WithResolvedChildren added in v0.11.1

func (in *InSubquery) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.InjectableExpression interface.

type InTuple added in v0.8.0

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

InTuple represents a VALUE IN (<VALUES>) expression.

func NewInTuple added in v0.8.0

func NewInTuple() *InTuple

NewInTuple returns a new *InTuple.

func (*InTuple) Children added in v0.8.0

func (it *InTuple) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*InTuple) Decay added in v0.12.0

func (it *InTuple) Decay() sql.Expression

Decay returns the expression as a series of OR expressions. The behavior is not the same, however it allows some paths to simplify their expression handling (such as filters).

func (*InTuple) Eval added in v0.8.0

func (it *InTuple) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*InTuple) IndexScanOperation added in v0.52.0

func (it *InTuple) IndexScanOperation() (sql.IndexScanOp, sql.Expression, sql.Expression, bool)

IndexScanOperation implements the sql.IndexComparisonExpression interface.

func (*InTuple) IsNullable added in v0.8.0

func (it *InTuple) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*InTuple) Left added in v0.8.0

func (it *InTuple) Left() sql.Expression

Left implements the expression.BinaryExpression interface.

func (*InTuple) Resolved added in v0.8.0

func (it *InTuple) Resolved() bool

Resolved implements the sql.Expression interface.

func (*InTuple) Right added in v0.8.0

func (it *InTuple) Right() sql.Expression

Right implements the expression.BinaryExpression interface.

func (*InTuple) String added in v0.8.0

func (it *InTuple) String() string

String implements the sql.Expression interface.

func (*InTuple) Type added in v0.8.0

func (it *InTuple) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*InTuple) WithChildren added in v0.8.0

func (it *InTuple) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*InTuple) WithResolvedChildren added in v0.8.0

func (it *InTuple) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.InjectableExpression interface.

type Interval added in v1.0.0

type Interval struct {
	*expression.Literal
	// contains filtered or unexported fields
}

Interval is a constant INTERVAL expression. It's a plain interval literal (embedding *expression.Literal for Eval/Type/etc.) that additionally implements GMS's expression.TimeDeltaExpression interface, so that GMS's generic Arithmetic expression can add/subtract it to/from a date/time value via GMS's own calendar-correct expression.TimeDelta.

func NewInterval added in v1.0.0

func NewInterval(d duration.Duration) *Interval

NewInterval returns a new *Interval wrapping the given duration.

func (*Interval) EvalDelta added in v1.0.0

func (i *Interval) EvalDelta(ctx *sql.Context, row sql.Row) (*expression.TimeDelta, error)

EvalDelta implements GMS's expression.TimeDeltaExpression interface, returning this interval's duration pre-converted into GMS's own expression.TimeDelta (computed once in NewInterval, since it depends only on the immutable duration).

func (*Interval) String added in v1.0.0

func (i *Interval) String() string

String implements the sql.Expression interface.

func (*Interval) WithChildren added in v1.0.0

func (i *Interval) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface. This overrides the embedded Literal's implementation, which would otherwise return the inner *Literal and drop this type's TimeDeltaExpression capability.

func (*Interval) WithResolvedChildren added in v1.0.0

func (i *Interval) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.Injectable interface, overriding the embedded Literal's implementation for the same reason as WithChildren above.

type IsDistinctFrom added in v0.56.0

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

IsDistinctFrom represents IS DISTINCT FROM expression.

func NewIsDistinctFrom added in v0.56.0

func NewIsDistinctFrom() *IsDistinctFrom

NewIsDistinctFrom returns a new *IsDistinctFrom.

func (*IsDistinctFrom) Children added in v0.56.0

func (n *IsDistinctFrom) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*IsDistinctFrom) Eval added in v0.56.0

func (n *IsDistinctFrom) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*IsDistinctFrom) IsNullable added in v0.56.0

func (n *IsDistinctFrom) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*IsDistinctFrom) Left added in v1.3.0

func (n *IsDistinctFrom) Left() sql.Expression

Left implements the expression.BinaryExpression interface.

func (*IsDistinctFrom) Resolved added in v0.56.0

func (n *IsDistinctFrom) Resolved() bool

Resolved implements the sql.Expression interface.

func (*IsDistinctFrom) Right added in v1.3.0

func (n *IsDistinctFrom) Right() sql.Expression

Right implements the expression.BinaryExpression interface.

func (*IsDistinctFrom) String added in v0.56.0

func (n *IsDistinctFrom) String() string

String implements the sql.Expression interface.

func (*IsDistinctFrom) Type added in v0.56.0

func (n *IsDistinctFrom) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*IsDistinctFrom) WithChildren added in v0.56.0

func (n *IsDistinctFrom) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*IsDistinctFrom) WithResolvedChildren added in v0.56.0

func (n *IsDistinctFrom) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.InjectableExpression interface.

type IsNotDistinctFrom added in v0.56.0

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

IsNotDistinctFrom represents IS NOT DISTINCT FROM expression.

func NewIsNotDistinctFrom added in v0.56.0

func NewIsNotDistinctFrom() *IsNotDistinctFrom

NewIsNotDistinctFrom returns a new *IsNotDistinctFrom.

func (*IsNotDistinctFrom) Children added in v0.56.0

func (n *IsNotDistinctFrom) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*IsNotDistinctFrom) Eval added in v0.56.0

func (n *IsNotDistinctFrom) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*IsNotDistinctFrom) IsNullable added in v0.56.0

func (n *IsNotDistinctFrom) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*IsNotDistinctFrom) Left added in v1.3.0

func (n *IsNotDistinctFrom) Left() sql.Expression

Left implements the expression.BinaryExpression interface.

func (*IsNotDistinctFrom) Resolved added in v0.56.0

func (n *IsNotDistinctFrom) Resolved() bool

Resolved implements the sql.Expression interface.

func (*IsNotDistinctFrom) Right added in v1.3.0

func (n *IsNotDistinctFrom) Right() sql.Expression

Right implements the expression.BinaryExpression interface.

func (*IsNotDistinctFrom) String added in v0.56.0

func (n *IsNotDistinctFrom) String() string

String implements the sql.Expression interface.

func (*IsNotDistinctFrom) Type added in v0.56.0

func (n *IsNotDistinctFrom) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*IsNotDistinctFrom) WithChildren added in v0.56.0

func (n *IsNotDistinctFrom) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*IsNotDistinctFrom) WithResolvedChildren added in v0.56.0

func (n *IsNotDistinctFrom) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.InjectableExpression interface.

type IsNotNull added in v0.51.0

type IsNotNull struct {
	expression.UnaryExpressionStub
}

IsNotNull is an implementation of sql.Expression for the IS NOT NULL operator and includes Postgres-specific logic for handling records and composites.

func NewIsNotNull added in v0.51.0

func NewIsNotNull(child sql.Expression) *IsNotNull

NewIsNotNull creates a new IsNotNull expression.

func (*IsNotNull) CollationCoercibility added in v0.51.0

func (*IsNotNull) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*IsNotNull) DebugString added in v0.51.0

func (e *IsNotNull) DebugString(ctx *sql.Context) string

func (*IsNotNull) Eval added in v0.51.0

func (e *IsNotNull) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*IsNotNull) IsNotNullExpression added in v0.51.0

func (e *IsNotNull) IsNotNullExpression() bool

IsNotNullExpression implements the sql.IsNotNullExpression interface. This function exists primarily to ensure the IsNotNullExpression interface has a unique signature.

func (*IsNotNull) IsNullable added in v0.51.0

func (e *IsNotNull) IsNullable(ctx *sql.Context) bool

IsNullable implements the Expression interface.

func (*IsNotNull) String added in v0.51.0

func (e *IsNotNull) String() string

func (*IsNotNull) Type added in v0.51.0

func (e *IsNotNull) Type(ctx *sql.Context) sql.Type

Type implements the Expression interface.

func (*IsNotNull) WithChildren added in v0.51.0

func (e *IsNotNull) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type IsNull added in v0.51.0

type IsNull struct {
	expression.UnaryExpressionStub
}

IsNull is an implementation of sql.Expression for the IS NULL operator and includes Postgres-specific logic for handling records and composites.

func NewIsNull added in v0.51.0

func NewIsNull(child sql.Expression) *IsNull

NewIsNull creates a new IsNull expression.

func (*IsNull) CollationCoercibility added in v0.51.0

func (*IsNull) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*IsNull) DebugString added in v0.51.0

func (e *IsNull) DebugString(ctx *sql.Context) string

func (*IsNull) Eval added in v0.51.0

func (e *IsNull) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*IsNull) IsNullExpression added in v0.51.0

func (e *IsNull) IsNullExpression() bool

IsNullExpression implements the sql.IsNullExpression interface. This function exists primarily to ensure the IsNullExpression interface has a unique signature.

func (*IsNull) IsNullable added in v0.51.0

func (e *IsNull) IsNullable(ctx *sql.Context) bool

IsNullable implements the Expression interface.

func (*IsNull) String added in v0.51.0

func (e *IsNull) String() string

func (*IsNull) Type added in v0.51.0

func (e *IsNull) Type(ctx *sql.Context) sql.Type

Type implements the Expression interface.

func (*IsNull) WithChildren added in v0.51.0

func (e *IsNull) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type JoinComparator added in v0.12.0

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

JoinComparator is specifically for handling how GMS implements joins by implementing expression.Comparer over binary operators.

func NewJoinComparator added in v0.12.0

func NewJoinComparator(ctx *sql.Context, eq *BinaryOperator) (*JoinComparator, error)

NewJoinComparator returns a new *JoinComparator.

func (*JoinComparator) Children added in v0.12.0

func (j *JoinComparator) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*JoinComparator) Compare added in v0.12.0

func (j *JoinComparator) Compare(ctx *sql.Context, row sql.Row) (int, error)

Compare implements the expression.Comparer interface.

func (*JoinComparator) Eval added in v0.12.0

func (j *JoinComparator) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*JoinComparator) IsNullable added in v0.12.0

func (j *JoinComparator) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*JoinComparator) Left added in v0.12.0

func (j *JoinComparator) Left() sql.Expression

Left implements the expression.BinaryExpression interface.

func (*JoinComparator) RepresentsEquality added in v0.12.0

func (j *JoinComparator) RepresentsEquality() bool

RepresentsEquality implements the expression.Equality interface.

func (*JoinComparator) Resolved added in v0.12.0

func (j *JoinComparator) Resolved() bool

Resolved implements the sql.Expression interface.

func (*JoinComparator) Right added in v0.12.0

func (j *JoinComparator) Right() sql.Expression

Right implements the expression.BinaryExpression interface.

func (*JoinComparator) String added in v0.12.0

func (j *JoinComparator) String() string

String implements the sql.Expression interface.

func (*JoinComparator) SwapParameters added in v0.12.0

func (j *JoinComparator) SwapParameters(ctx *sql.Context) (expression.Equality, error)

SwapParameters implements the expression.Equality interface.

func (*JoinComparator) ToComparer added in v0.12.0

func (j *JoinComparator) ToComparer(ctx *sql.Context) (expression.Comparer, error)

ToComparer implements the expression.Equality interface.

func (*JoinComparator) Type added in v0.12.0

func (j *JoinComparator) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*JoinComparator) WithChildren added in v0.12.0

func (j *JoinComparator) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

type Least added in v0.57.1

type Least struct {
	Args []sql.Expression
	// contains filtered or unexported fields
}

Least represents a LEAST expression.

func (*Least) Children added in v0.57.1

func (n *Least) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*Least) Eval added in v0.57.1

func (n *Least) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*Least) IsNullable added in v0.57.1

func (n *Least) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*Least) Resolved added in v0.57.1

func (n *Least) Resolved() bool

Resolved implements the sql.Expression interface.

func (*Least) String added in v0.57.1

func (n *Least) String() string

String implements the sql.Expression interface.

func (*Least) Type added in v0.57.1

func (n *Least) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*Least) WithChildren added in v0.57.1

func (n *Least) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*Least) WithResolvedChildren added in v0.57.1

func (n *Least) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.InjectableExpression interface.

type Not added in v0.10.0

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

Not represents a NOT expression.

func NewNot added in v0.10.0

func NewNot() *Not

NewNot returns a new *Not.

func (*Not) Children added in v0.10.0

func (n *Not) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*Not) Eval added in v0.10.0

func (n *Not) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*Not) IndexScanOperation added in v0.54.6

func (n *Not) IndexScanOperation() (sql.IndexScanOp, sql.Expression, sql.Expression, bool)

IndexScanOperation implements the sql.IndexComparisonExpression interface.

func (*Not) IsNullable added in v0.10.0

func (n *Not) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*Not) Resolved added in v0.10.0

func (n *Not) Resolved() bool

Resolved implements the sql.Expression interface.

func (*Not) String added in v0.10.0

func (n *Not) String() string

String implements the sql.Expression interface.

func (*Not) Type added in v0.10.0

func (n *Not) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*Not) WithChildren added in v0.10.0

func (n *Not) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*Not) WithResolvedChildren added in v0.10.0

func (n *Not) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.InjectableExpression interface.

type Parens added in v1.4.0

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

Parens represents a parenthesized expression whose parentheses must survive in its string form.

func NewParens added in v1.4.0

func NewParens() *Parens

NewParens returns a new *Parens.

func (*Parens) Children added in v1.4.0

func (p *Parens) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*Parens) Eval added in v1.4.0

func (p *Parens) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*Parens) IsNullable added in v1.4.0

func (p *Parens) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*Parens) Resolved added in v1.4.0

func (p *Parens) Resolved() bool

Resolved implements the sql.Expression interface.

func (*Parens) String added in v1.4.0

func (p *Parens) String() string

String implements the sql.Expression interface.

func (*Parens) Type added in v1.4.0

func (p *Parens) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*Parens) WithChildren added in v1.4.0

func (p *Parens) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*Parens) WithResolvedChildren added in v1.4.0

func (p *Parens) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.InjectableExpression interface.

type PgCoalesce added in v0.56.5

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

PgCoalesce is a Doltgres-native COALESCE implementation. It uses Postgres type-resolution rules (FindCommonType) to compute the correct result type.

func NewPgCoalesce added in v0.56.5

func NewPgCoalesce(ctx *sql.Context, args ...sql.Expression) (*PgCoalesce, error)

NewPgCoalesce creates a new PgCoalesce expression.

func (*PgCoalesce) Children added in v0.56.5

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

Children implements sql.Expression.

func (*PgCoalesce) CollationCoercibility added in v0.56.5

func (c *PgCoalesce) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements sql.CollationCoercible.

func (*PgCoalesce) DebugString added in v0.56.5

func (c *PgCoalesce) DebugString(ctx *sql.Context) string

DebugString implements the sql.Debuggable interface.

func (*PgCoalesce) Description added in v0.56.5

func (c *PgCoalesce) Description() string

Description implements sql.FunctionExpression.

func (*PgCoalesce) Eval added in v0.56.5

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

Eval implements sql.Expression. Returns the first non-null argument value, cast to the common type.

func (*PgCoalesce) FunctionName added in v0.56.5

func (c *PgCoalesce) FunctionName() string

FunctionName implements sql.FunctionExpression.

func (*PgCoalesce) IsNullable added in v0.56.5

func (c *PgCoalesce) IsNullable(ctx *sql.Context) bool

IsNullable implements sql.Expression.

func (*PgCoalesce) Resolved added in v0.56.5

func (c *PgCoalesce) Resolved() bool

Resolved implements sql.Expression.

func (*PgCoalesce) String added in v0.56.5

func (c *PgCoalesce) String() string

String implements sql.Expression.

func (*PgCoalesce) Type added in v0.56.5

func (c *PgCoalesce) Type(_ *sql.Context) sql.Type

Type implements sql.Expression.

func (*PgCoalesce) WithChildren added in v0.56.5

func (c *PgCoalesce) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression.

type PostgresExpressionFactory added in v0.51.0

type PostgresExpressionFactory struct{}

PostgresExpressionFactory implements the expression.ExpressionFactory interface and allows callers to produce expressions that have custom behavior for Postgres.

func (PostgresExpressionFactory) NewIsNotNull added in v0.51.0

NewIsNotNull implements the expression.ExpressionFactory interface.

func (PostgresExpressionFactory) NewIsNull added in v0.51.0

NewIsNull implements the expression.ExpressionFactory interface.

type RecordExpr added in v0.51.0

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

RecordExpr is a set of sql.Expressions wrapped together in a single value.

func NewRecordExpr added in v0.51.0

func NewRecordExpr() *RecordExpr

NewRecordExpr creates a new record expression.

func (*RecordExpr) Children added in v0.51.0

func (t *RecordExpr) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*RecordExpr) Eval added in v0.51.0

func (t *RecordExpr) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*RecordExpr) IsNullable added in v0.51.0

func (t *RecordExpr) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*RecordExpr) Resolved added in v0.51.0

func (t *RecordExpr) Resolved() bool

Resolved implements the sql.Expression interface.

func (*RecordExpr) String added in v0.51.0

func (t *RecordExpr) String() string

String implements the sql.Expression interface.

func (*RecordExpr) Type added in v0.51.0

func (t *RecordExpr) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*RecordExpr) WithChildren added in v0.51.0

func (t *RecordExpr) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*RecordExpr) WithResolvedChildren added in v0.51.0

func (t *RecordExpr) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.Injectable interface

type RowComparison added in v1.4.0

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

RowComparison represents a comparison between a row constructor and either another row constructor or the rows of a subquery, which compares the rows field by field.

func NewRowComparison added in v1.4.0

func NewRowComparison(operator framework.Operator, quantifier string) *RowComparison

NewRowComparison returns a new *RowComparison.

func (*RowComparison) Children added in v1.4.0

func (r *RowComparison) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*RowComparison) Eval added in v1.4.0

func (r *RowComparison) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*RowComparison) IsNullable added in v1.4.0

func (r *RowComparison) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*RowComparison) Operator added in v1.4.0

func (r *RowComparison) Operator() framework.Operator

Operator returns the operator that is used.

func (*RowComparison) Resolved added in v1.4.0

func (r *RowComparison) Resolved() bool

Resolved implements the sql.Expression interface.

func (*RowComparison) String added in v1.4.0

func (r *RowComparison) String() string

String implements the sql.Expression interface.

func (*RowComparison) Type added in v1.4.0

func (r *RowComparison) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*RowComparison) WithChildren added in v1.4.0

func (r *RowComparison) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*RowComparison) WithResolvedChildren added in v1.4.0

func (r *RowComparison) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.Injectable interface.

type StatementRunner added in v0.50.1

type StatementRunner struct {
	Runner sql.StatementRunner
}

StatementRunner is an expression that can be added to a node to grab the statement runner.

func (StatementRunner) Children added in v0.50.1

func (StatementRunner) Children() []sql.Expression

Children implements the sql.Expression interface.

func (StatementRunner) Eval added in v0.50.1

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

Eval implements the sql.Expression interface.

func (StatementRunner) IsNullable added in v0.50.1

func (StatementRunner) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (StatementRunner) Resolved added in v0.50.1

func (StatementRunner) Resolved() bool

Resolved implements the sql.Expression interface.

func (StatementRunner) SetStatementRunner added in v0.50.1

func (sr StatementRunner) SetStatementRunner(ctx *sql.Context, runner sql.StatementRunner) sql.Expression

SetStatementRunner implements the sql.Expression interface.

func (StatementRunner) String added in v0.50.1

func (StatementRunner) String() string

String implements the sql.Expression interface.

func (StatementRunner) Type added in v0.50.1

func (StatementRunner) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (StatementRunner) WithChildren added in v0.50.1

func (sr StatementRunner) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

type Subscript added in v0.50.0

type Subscript struct {
	Child   sql.Expression
	Indexes []sql.Expression
	// Slice uses lower/upper pairs in Indexes. Omitted distinguishes an omitted bound from SQL NULL.
	Slice   bool
	Omitted []bool
}

Subscript represents a subscript expression, e.g. `a[1]` or `a[1][2]`.

func NewSubscript added in v0.50.0

func NewSubscript(child sql.Expression, indexes ...sql.Expression) *Subscript

NewSubscript creates a new Subscript expression.

func (Subscript) Children added in v0.50.0

func (s Subscript) Children() []sql.Expression

Children implements sql.Expression.

func (Subscript) Eval added in v0.50.0

func (s Subscript) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements sql.Expression.

func (Subscript) IsNullable added in v0.50.0

func (s Subscript) IsNullable(ctx *sql.Context) bool

IsNullable implements sql.Expression.

func (Subscript) Resolved added in v0.50.0

func (s Subscript) Resolved() bool

Resolved implements sql.Expression.

func (Subscript) String added in v0.50.0

func (s Subscript) String() string

String implements sql.Expression.

func (Subscript) Type added in v0.50.0

func (s Subscript) Type(ctx *sql.Context) sql.Type

Type implements sql.Expression.

func (Subscript) WithChildren added in v0.50.0

func (s Subscript) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression.

func (Subscript) WithResolvedChildren added in v0.50.0

func (s Subscript) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements vitess.Injectable.

type SubscriptAssignment added in v1.4.0

type SubscriptAssignment struct {
	Subscript
	Value sql.Expression
}

SubscriptAssignment constructs the new array value for a subscript UPDATE target. The stored value is never mutated, including when it contains nested arrays.

func (SubscriptAssignment) Children added in v1.4.0

func (s SubscriptAssignment) Children() []sql.Expression

Children implements sql.Expression.

func (SubscriptAssignment) Eval added in v1.4.0

func (s SubscriptAssignment) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements sql.Expression.

func (SubscriptAssignment) Resolved added in v1.4.0

func (s SubscriptAssignment) Resolved() bool

Resolved implements sql.Expression.

func (SubscriptAssignment) String added in v1.4.0

func (s SubscriptAssignment) String() string

String implements sql.Expression.

func (SubscriptAssignment) Type added in v1.4.0

func (s SubscriptAssignment) Type(ctx *sql.Context) sql.Type

Type implements sql.Expression.

func (SubscriptAssignment) WithChildren added in v1.4.0

func (s SubscriptAssignment) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements sql.Expression.

func (SubscriptAssignment) WithResolvedChildren added in v1.4.0

func (s SubscriptAssignment) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements vitess.Injectable.

type TableToComposite added in v0.54.6

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

TableToComposite is a set of sql.Expressions wrapped together in a single value.

func (*TableToComposite) Children added in v0.54.6

func (t *TableToComposite) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*TableToComposite) Eval added in v0.54.6

func (t *TableToComposite) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*TableToComposite) IsNullable added in v0.54.6

func (t *TableToComposite) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*TableToComposite) Resolved added in v0.54.6

func (t *TableToComposite) Resolved() bool

Resolved implements the sql.Expression interface.

func (*TableToComposite) String added in v0.54.6

func (t *TableToComposite) String() string

String implements the sql.Expression interface.

func (*TableToComposite) Type added in v0.54.6

func (t *TableToComposite) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*TableToComposite) WithChildren added in v0.54.6

func (t *TableToComposite) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression 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(ctx *sql.Context) 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(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*UnaryOperator) WithChildren added in v0.5.0

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

WithChildren implements the sql.Expression interface.

func (*UnaryOperator) WithResolvedChildren added in v0.5.0

func (b *UnaryOperator) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.InjectableExpression interface.

type UpdateExpressionApplier added in v1.3.2

type UpdateExpressionApplier struct{}

UpdateExpressionApplier evaluates explicit UPDATE assignments against the pre-update row.

func (UpdateExpressionApplier) ApplyRowUpdate added in v1.3.2

func (UpdateExpressionApplier) ApplyRowUpdate(ctx *sql.Context, updateExprs *sql.UpdateExprs, tableSchema sql.Schema, oldRow sql.Row, _ bool) (sql.Row, error)

ApplyRowUpdate implements sql.UpdateExpressionApplier. PostgreSQL does not support UPDATE IGNORE, so assignment errors are always returned to the caller.

type XmlConcat added in v1.4.0

type XmlConcat struct {
	Args []sql.Expression
}

XmlConcat represents an XMLCONCAT expression.

func (*XmlConcat) Children added in v1.4.0

func (x *XmlConcat) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*XmlConcat) Eval added in v1.4.0

func (x *XmlConcat) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface. Declarations are dropped from the values, and the result carries one only when every value agrees on a version other than 1.0 or any value declares standalone, as PostgreSQL does.

func (*XmlConcat) IsNullable added in v1.4.0

func (x *XmlConcat) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*XmlConcat) Resolved added in v1.4.0

func (x *XmlConcat) Resolved() bool

Resolved implements the sql.Expression interface.

func (*XmlConcat) String added in v1.4.0

func (x *XmlConcat) String() string

String implements the sql.Expression interface.

func (*XmlConcat) Type added in v1.4.0

func (x *XmlConcat) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*XmlConcat) WithChildren added in v1.4.0

func (x *XmlConcat) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*XmlConcat) WithResolvedChildren added in v1.4.0

func (x *XmlConcat) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.Injectable interface.

type XmlElement added in v1.4.0

type XmlElement struct {
	Name           string
	AttributeNames []string
	// contains filtered or unexported fields
}

XmlElement represents an XMLELEMENT expression, whose children are the attribute values followed by the content.

func NewXmlElement added in v1.4.0

func NewXmlElement(name string, attributeNames []string) (*XmlElement, error)

NewXmlElement returns a new XmlElement for the SQL identifiers `name` and `attributeNames`, which are mapped to XML names as PostgreSQL does.

func (*XmlElement) Children added in v1.4.0

func (x *XmlElement) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*XmlElement) Eval added in v1.4.0

func (x *XmlElement) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*XmlElement) IsNullable added in v1.4.0

func (x *XmlElement) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*XmlElement) Resolved added in v1.4.0

func (x *XmlElement) Resolved() bool

Resolved implements the sql.Expression interface.

func (*XmlElement) String added in v1.4.0

func (x *XmlElement) String() string

String implements the sql.Expression interface.

func (*XmlElement) Type added in v1.4.0

func (x *XmlElement) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*XmlElement) WithChildren added in v1.4.0

func (x *XmlElement) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*XmlElement) WithResolvedChildren added in v1.4.0

func (x *XmlElement) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.Injectable interface.

type XmlForest added in v1.4.0

type XmlForest struct {
	Names []string
	// contains filtered or unexported fields
}

XmlForest represents an XMLFOREST expression, whose children are the values of the named elements.

func NewXmlForest added in v1.4.0

func NewXmlForest(names []string) *XmlForest

NewXmlForest returns a new XmlForest for the given SQL identifiers, which are mapped to XML names.

func (*XmlForest) Children added in v1.4.0

func (x *XmlForest) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*XmlForest) Eval added in v1.4.0

func (x *XmlForest) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*XmlForest) IsNullable added in v1.4.0

func (x *XmlForest) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*XmlForest) Resolved added in v1.4.0

func (x *XmlForest) Resolved() bool

Resolved implements the sql.Expression interface.

func (*XmlForest) String added in v1.4.0

func (x *XmlForest) String() string

String implements the sql.Expression interface.

func (*XmlForest) Type added in v1.4.0

func (x *XmlForest) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*XmlForest) WithChildren added in v1.4.0

func (x *XmlForest) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*XmlForest) WithResolvedChildren added in v1.4.0

func (x *XmlForest) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.Injectable interface.

type XmlIsDocument added in v1.4.0

type XmlIsDocument struct {
	Expr sql.Expression
}

XmlIsDocument represents an IS DOCUMENT expression.

func (*XmlIsDocument) Children added in v1.4.0

func (x *XmlIsDocument) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*XmlIsDocument) Eval added in v1.4.0

func (x *XmlIsDocument) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*XmlIsDocument) IsNullable added in v1.4.0

func (x *XmlIsDocument) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*XmlIsDocument) Resolved added in v1.4.0

func (x *XmlIsDocument) Resolved() bool

Resolved implements the sql.Expression interface.

func (*XmlIsDocument) String added in v1.4.0

func (x *XmlIsDocument) String() string

String implements the sql.Expression interface.

func (*XmlIsDocument) Type added in v1.4.0

func (x *XmlIsDocument) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*XmlIsDocument) WithChildren added in v1.4.0

func (x *XmlIsDocument) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*XmlIsDocument) WithResolvedChildren added in v1.4.0

func (x *XmlIsDocument) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.Injectable interface.

type XmlParse added in v1.4.0

type XmlParse struct {
	Document bool
	Expr     sql.Expression
}

XmlParse represents an XMLPARSE expression.

func (*XmlParse) Children added in v1.4.0

func (x *XmlParse) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*XmlParse) Eval added in v1.4.0

func (x *XmlParse) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*XmlParse) IsNullable added in v1.4.0

func (x *XmlParse) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*XmlParse) Resolved added in v1.4.0

func (x *XmlParse) Resolved() bool

Resolved implements the sql.Expression interface.

func (*XmlParse) String added in v1.4.0

func (x *XmlParse) String() string

String implements the sql.Expression interface.

func (*XmlParse) Type added in v1.4.0

func (x *XmlParse) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*XmlParse) WithChildren added in v1.4.0

func (x *XmlParse) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*XmlParse) WithResolvedChildren added in v1.4.0

func (x *XmlParse) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.Injectable interface.

type XmlPi added in v1.4.0

type XmlPi struct {
	Name string
	// contains filtered or unexported fields
}

XmlPi represents an XMLPI expression, whose optional child is the content of the processing instruction.

func NewXmlPi added in v1.4.0

func NewXmlPi(name string) (*XmlPi, error)

NewXmlPi returns a new XmlPi targeting the SQL identifier `name`, which is mapped to an XML name.

func (*XmlPi) Children added in v1.4.0

func (x *XmlPi) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*XmlPi) Eval added in v1.4.0

func (x *XmlPi) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*XmlPi) IsNullable added in v1.4.0

func (x *XmlPi) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*XmlPi) Resolved added in v1.4.0

func (x *XmlPi) Resolved() bool

Resolved implements the sql.Expression interface.

func (*XmlPi) String added in v1.4.0

func (x *XmlPi) String() string

String implements the sql.Expression interface.

func (*XmlPi) Type added in v1.4.0

func (x *XmlPi) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*XmlPi) WithChildren added in v1.4.0

func (x *XmlPi) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*XmlPi) WithResolvedChildren added in v1.4.0

func (x *XmlPi) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.Injectable interface.

type XmlRoot added in v1.4.0

type XmlRoot struct {
	HasVersion bool
	Standalone *string
	// contains filtered or unexported fields
}

XmlRoot represents an XMLROOT expression. Its children are the xml value and, when HasVersion is set, the version. Standalone is nil when the STANDALONE option is omitted, and otherwise holds "yes", "no", or "" for NO VALUE.

func (*XmlRoot) Children added in v1.4.0

func (x *XmlRoot) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*XmlRoot) Eval added in v1.4.0

func (x *XmlRoot) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*XmlRoot) IsNullable added in v1.4.0

func (x *XmlRoot) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*XmlRoot) Resolved added in v1.4.0

func (x *XmlRoot) Resolved() bool

Resolved implements the sql.Expression interface.

func (*XmlRoot) String added in v1.4.0

func (x *XmlRoot) String() string

String implements the sql.Expression interface.

func (*XmlRoot) Type added in v1.4.0

func (x *XmlRoot) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*XmlRoot) WithChildren added in v1.4.0

func (x *XmlRoot) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*XmlRoot) WithResolvedChildren added in v1.4.0

func (x *XmlRoot) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.Injectable interface.

type XmlSerialize added in v1.4.0

type XmlSerialize struct {
	Document   bool
	TargetType *pgtypes.DoltgresType
	Expr       sql.Expression
}

XmlSerialize represents an XMLSERIALIZE expression, which casts the text of its xml child to TargetType.

func (*XmlSerialize) Children added in v1.4.0

func (x *XmlSerialize) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*XmlSerialize) Eval added in v1.4.0

func (x *XmlSerialize) Eval(ctx *sql.Context, row sql.Row) (any, error)

Eval implements the sql.Expression interface.

func (*XmlSerialize) IsNullable added in v1.4.0

func (x *XmlSerialize) IsNullable(ctx *sql.Context) bool

IsNullable implements the sql.Expression interface.

func (*XmlSerialize) Resolved added in v1.4.0

func (x *XmlSerialize) Resolved() bool

Resolved implements the sql.Expression interface.

func (*XmlSerialize) String added in v1.4.0

func (x *XmlSerialize) String() string

String implements the sql.Expression interface.

func (*XmlSerialize) Type added in v1.4.0

func (x *XmlSerialize) Type(ctx *sql.Context) sql.Type

Type implements the sql.Expression interface.

func (*XmlSerialize) WithChildren added in v1.4.0

func (x *XmlSerialize) WithChildren(ctx *sql.Context, children ...sql.Expression) (sql.Expression, error)

WithChildren implements the sql.Expression interface.

func (*XmlSerialize) WithResolvedChildren added in v1.4.0

func (x *XmlSerialize) WithResolvedChildren(ctx context.Context, children []any) (any, error)

WithResolvedChildren implements the vitess.Injectable interface.

func (*XmlSerialize) WithType added in v1.4.0

func (x *XmlSerialize) WithType(typ *pgtypes.DoltgresType) *XmlSerialize

WithType returns a copy of the expression with the given target type.

Jump to

Keyboard shortcuts

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