internal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinaryOperatorDescriptor

type BinaryOperatorDescriptor struct {
	TypeConstraints []BinaryOperatorTypeConstraint
	OpTranslator    func(left, right TranslationResult) TranslationResult
}

func BooleanOperatorDescriptor

func BooleanOperatorDescriptor(op string) BinaryOperatorDescriptor

func ComparisonOperatorDescriptor

func ComparisonOperatorDescriptor(op string) BinaryOperatorDescriptor

func NillableComparisonOperatorDescriptor

func NillableComparisonOperatorDescriptor(op, nilOp string) BinaryOperatorDescriptor

NillableComparisonOperatorDescriptor is a special ComparisonOperatorDescriptor which handles NULL comparison

func NumericOperatorDescriptor

func NumericOperatorDescriptor(op string) BinaryOperatorDescriptor

func StringLikeOperatorDescriptor

func StringLikeOperatorDescriptor(prefix, suffix string) BinaryOperatorDescriptor

type BinaryOperatorTypeConstraint

type BinaryOperatorTypeConstraint struct {
	Left  ExprType
	Right ExprType
}

type ExprType

type ExprType string
const (
	ExprTypeNil       ExprType = "expr_nil"
	ExprTypeInt       ExprType = "expr_int"
	ExprTypeFloat     ExprType = "expr_float"
	ExprTypeBool      ExprType = "expr_bool"
	ExprTypeString    ExprType = "expr_string"
	ExprTypeTimestamp ExprType = "expr_timestamp"

	ExprTypeIntIdentifier       ExprType = "int"
	ExprTypeFloatIdentifier     ExprType = "float"
	ExprTypeBoolIdentifier      ExprType = "bool"
	ExprTypeStringIdentifier    ExprType = "string"
	ExprTypeTimestampIdentifier ExprType = "timestamp"
	ExprTypeJSONIdentifier      ExprType = "json"
)

type TranslationResult

type TranslationResult struct {
	Expr string
	Type ExprType
}

type UnaryOperatorDescriptor

type UnaryOperatorDescriptor struct {
	TypeConstraints []ExprType
	OpTranslator    func(nested TranslationResult) TranslationResult
}

func UnaryBooleanOperatorDescriptor

func UnaryBooleanOperatorDescriptor(op string) UnaryOperatorDescriptor

func UnaryNumericOperatorDescriptor

func UnaryNumericOperatorDescriptor(op string) UnaryOperatorDescriptor

Jump to

Keyboard shortcuts

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