Documentation ¶
Index ¶
- Constants
- Variables
- func AreSyncTypeParametersMatching(funcParameters []FuncDefArgType, argumentTypes []Type) bool
- func GetShortTypeName(name TypeName) string
- func GetTypeNameToTypeMap() map[string]Type
- func TypeToProto(t Type) *proto.Type
- type AggregationInvocation
- type AggregationPhase
- type AnyType
- func (m *AnyType) GetNullability() Nullability
- func (m *AnyType) GetParameterizedParams() []interface{}
- func (m *AnyType) HasParameterizedParam() bool
- func (m *AnyType) MatchWithNullability(ot Type) bool
- func (m *AnyType) MatchWithoutNullability(ot Type) bool
- func (m *AnyType) ReturnType(funcParameters []FuncDefArgType, argumentTypes []Type) (Type, error)
- func (m *AnyType) SetNullability(n Nullability) FuncDefArgType
- func (m *AnyType) ShortString() string
- func (m *AnyType) String() string
- func (m *AnyType) WithParameters([]interface{}) (Type, error)
- type Assignment
- type BinaryExpr
- type BinaryOp
- type BinaryType
- type BooleanParameter
- type BooleanType
- type CastFailBehavior
- type CompositeType
- type DataTypeParameter
- type DataTypeUDTParam
- type Date
- type DateType
- type Decimal
- type DecimalType
- func (*DecimalType) BaseString() string
- func (s *DecimalType) Equals(rhs Type) bool
- func (s *DecimalType) GetNullability() Nullability
- func (s *DecimalType) GetParameters() []interface{}
- func (s *DecimalType) GetType() Type
- func (s *DecimalType) GetTypeVariationReference() uint32
- func (s *DecimalType) ParameterString() string
- func (*DecimalType) ShortString() string
- func (s *DecimalType) String() string
- func (s *DecimalType) ToProto() *proto.Type
- func (s *DecimalType) ToProtoFuncArg() *proto.FunctionArgument
- func (s *DecimalType) WithNullability(n Nullability) Type
- type Enum
- type EnumParameter
- type EnumType
- func (e *EnumType) Equals(t Type) bool
- func (e *EnumType) GetNullability() Nullability
- func (e *EnumType) GetParameterizedParams() []interface{}
- func (e *EnumType) GetParameters() []interface{}
- func (e *EnumType) GetType() Type
- func (e *EnumType) GetTypeVariationReference() uint32
- func (e *EnumType) HasParameterizedParam() bool
- func (e *EnumType) MatchWithNullability(ot Type) bool
- func (e *EnumType) MatchWithoutNullability(ot Type) bool
- func (e *EnumType) ReturnType(funcParameters []FuncDefArgType, argumentTypes []Type) (Type, error)
- func (e *EnumType) SetNullability(n Nullability) FuncDefArgType
- func (e *EnumType) ShortString() string
- func (e *EnumType) String() string
- func (e *EnumType) ToProtoFuncArg() *proto.FunctionArgument
- func (e *EnumType) WithNullability(n Nullability) Type
- func (e *EnumType) WithParameters(params []interface{}) (Type, error)
- type Expr
- type FixedBinary
- type FixedBinaryType
- type FixedChar
- type FixedCharType
- type FixedLenType
- func (s *FixedLenType[T]) BaseString() string
- func (s *FixedLenType[T]) Equals(rhs Type) bool
- func (s *FixedLenType[T]) GetLength() int32
- func (s *FixedLenType[T]) GetNullability() Nullability
- func (s *FixedLenType[T]) GetParameters() []interface{}
- func (s *FixedLenType[T]) GetReturnType(length int32, nullability Nullability) Type
- func (s *FixedLenType[T]) GetType() Type
- func (s *FixedLenType[T]) GetTypeVariationReference() uint32
- func (s *FixedLenType[T]) ParameterString() string
- func (*FixedLenType[T]) ShortString() string
- func (s *FixedLenType[T]) String() string
- func (s *FixedLenType[T]) ToProtoFuncArg() *proto.FunctionArgument
- func (s *FixedLenType[T]) WithLength(length int32) FixedType
- func (s *FixedLenType[T]) WithNullability(n Nullability) Type
- type FixedType
- type Float32Type
- type Float64Type
- type FuncArg
- type FuncDefArgType
- type FunctionCallExpr
- type FunctionOption
- type FunctionRef
- type IfExpr
- type Int16Type
- type Int32Type
- type Int64Type
- type Int8Type
- type IntegerParameter
- type IntegerUDTParam
- type IntervalCompoundType
- func (m IntervalCompoundType) Equals(rhs Type) bool
- func (m IntervalCompoundType) GetNullability() Nullability
- func (m IntervalCompoundType) GetParameters() []interface{}
- func (m IntervalCompoundType) GetPrecisionProtoVal() int32
- func (m IntervalCompoundType) GetType() Type
- func (m IntervalCompoundType) GetTypeVariationReference() uint32
- func (IntervalCompoundType) ShortString() string
- func (m IntervalCompoundType) String() string
- func (m IntervalCompoundType) ToProto() *proto.Type
- func (m IntervalCompoundType) ToProtoFuncArg() *proto.FunctionArgument
- func (m IntervalCompoundType) WithNullability(n Nullability) Type
- func (m IntervalCompoundType) WithPrecision(precision TimePrecision) IntervalCompoundType
- func (m IntervalCompoundType) WithTypeVariationRef(typeVariationRef uint32) IntervalCompoundType
- type IntervalDayToSecond
- type IntervalDayType
- func (s *IntervalDayType) BaseString() string
- func (m *IntervalDayType) Equals(rhs Type) bool
- func (m *IntervalDayType) GetNullability() Nullability
- func (m *IntervalDayType) GetParameters() []interface{}
- func (m *IntervalDayType) GetPrecision() TimePrecision
- func (m *IntervalDayType) GetPrecisionProtoVal() int32
- func (m *IntervalDayType) GetReturnType(length int32, nullability Nullability) Type
- func (m *IntervalDayType) GetType() Type
- func (m *IntervalDayType) GetTypeVariationReference() uint32
- func (m *IntervalDayType) ParameterString() string
- func (*IntervalDayType) ShortString() string
- func (m *IntervalDayType) String() string
- func (m *IntervalDayType) ToProto() *proto.Type
- func (m *IntervalDayType) ToProtoFuncArg() *proto.FunctionArgument
- func (m *IntervalDayType) WithNullability(n Nullability) Type
- type IntervalYearToMonth
- type IntervalYearToMonthType
- func (m IntervalYearToMonthType) Equals(rhs Type) bool
- func (m IntervalYearToMonthType) GetNullability() Nullability
- func (m IntervalYearToMonthType) GetParameters() []interface{}
- func (m IntervalYearToMonthType) GetType() Type
- func (m IntervalYearToMonthType) GetTypeVariationReference() uint32
- func (IntervalYearToMonthType) ShortString() string
- func (m IntervalYearToMonthType) String() string
- func (m IntervalYearToMonthType) ToProto() *proto.Type
- func (m IntervalYearToMonthType) ToProtoFuncArg() *proto.FunctionArgument
- func (m IntervalYearToMonthType) WithNullability(n Nullability) Type
- func (m IntervalYearToMonthType) WithTypeVariationRef(typeVariationRef uint32) IntervalYearToMonthType
- type IntervalYearType
- type ListType
- func (*ListType) BaseString() string
- func (t *ListType) Equals(rhs Type) bool
- func (s *ListType) GetNullability() Nullability
- func (s *ListType) GetParameters() []interface{}
- func (s *ListType) GetType() Type
- func (s *ListType) GetTypeVariationReference() uint32
- func (s *ListType) ParameterString() string
- func (*ListType) ShortString() string
- func (t *ListType) String() string
- func (t *ListType) ToProto() *proto.Type
- func (t *ListType) ToProtoFuncArg() *proto.FunctionArgument
- func (s *ListType) WithNullability(n Nullability) Type
- type LiteralNumber
- type MapType
- func (*MapType) BaseString() string
- func (t *MapType) Equals(rhs Type) bool
- func (s *MapType) GetNullability() Nullability
- func (s *MapType) GetParameters() []interface{}
- func (s *MapType) GetType() Type
- func (s *MapType) GetTypeVariationReference() uint32
- func (t *MapType) ParameterString() string
- func (t *MapType) ShortString() string
- func (t *MapType) String() string
- func (t *MapType) ToProto() *proto.Type
- func (t *MapType) ToProtoFuncArg() *proto.FunctionArgument
- func (s *MapType) WithNullability(n Nullability) Type
- type NamedStruct
- type NotExpr
- type NullParameter
- type Nullability
- type OutputDerivation
- func (m *OutputDerivation) GetNullability() Nullability
- func (m *OutputDerivation) GetParameterizedParams() []interface{}
- func (m *OutputDerivation) HasParameterizedParam() bool
- func (m *OutputDerivation) MatchWithNullability(ot Type) bool
- func (m *OutputDerivation) MatchWithoutNullability(ot Type) bool
- func (m *OutputDerivation) ReturnType(funcParameters []FuncDefArgType, argumentTypes []Type) (Type, error)
- func (m *OutputDerivation) SetNullability(n Nullability) FuncDefArgType
- func (m *OutputDerivation) ShortString() string
- func (m *OutputDerivation) String() string
- func (m *OutputDerivation) WithParameters([]interface{}) (Type, error)
- type ParameterizedDecimalType
- func (m *ParameterizedDecimalType) GetNullability() Nullability
- func (m *ParameterizedDecimalType) GetParameterizedParams() []interface{}
- func (m *ParameterizedDecimalType) HasParameterizedParam() bool
- func (m *ParameterizedDecimalType) MatchWithNullability(ot Type) bool
- func (m *ParameterizedDecimalType) MatchWithoutNullability(ot Type) bool
- func (m *ParameterizedDecimalType) ReturnType(parameters []FuncDefArgType, argumentTypes []Type) (Type, error)
- func (m *ParameterizedDecimalType) SetNullability(n Nullability) FuncDefArgType
- func (m *ParameterizedDecimalType) ShortString() string
- func (m *ParameterizedDecimalType) String() string
- func (m *ParameterizedDecimalType) WithParameters(params []interface{}) (Type, error)
- type ParameterizedFixedBinaryType
- type ParameterizedFixedCharType
- type ParameterizedIntervalDayType
- type ParameterizedListType
- func (m *ParameterizedListType) GetNullability() Nullability
- func (m *ParameterizedListType) GetParameterizedParams() []interface{}
- func (m *ParameterizedListType) HasParameterizedParam() bool
- func (m *ParameterizedListType) MatchWithNullability(ot Type) bool
- func (m *ParameterizedListType) MatchWithoutNullability(ot Type) bool
- func (m *ParameterizedListType) ReturnType([]FuncDefArgType, []Type) (Type, error)
- func (m *ParameterizedListType) SetNullability(n Nullability) FuncDefArgType
- func (m *ParameterizedListType) ShortString() string
- func (m *ParameterizedListType) String() string
- func (m *ParameterizedListType) WithParameters(params []interface{}) (Type, error)
- type ParameterizedMapType
- func (m *ParameterizedMapType) GetNullability() Nullability
- func (m *ParameterizedMapType) GetParameterizedParams() []interface{}
- func (m *ParameterizedMapType) HasParameterizedParam() bool
- func (m *ParameterizedMapType) MatchWithNullability(ot Type) bool
- func (m *ParameterizedMapType) MatchWithoutNullability(ot Type) bool
- func (m *ParameterizedMapType) ReturnType([]FuncDefArgType, []Type) (Type, error)
- func (m *ParameterizedMapType) SetNullability(n Nullability) FuncDefArgType
- func (m *ParameterizedMapType) ShortString() string
- func (m *ParameterizedMapType) String() string
- func (m *ParameterizedMapType) WithParameters(params []interface{}) (Type, error)
- type ParameterizedPrecisionTimestampType
- type ParameterizedPrecisionTimestampTzType
- type ParameterizedStructType
- func (m *ParameterizedStructType) GetNullability() Nullability
- func (m *ParameterizedStructType) GetParameterizedParams() []interface{}
- func (m *ParameterizedStructType) HasParameterizedParam() bool
- func (m *ParameterizedStructType) MatchWithNullability(ot Type) bool
- func (m *ParameterizedStructType) MatchWithoutNullability(ot Type) bool
- func (m *ParameterizedStructType) ReturnType([]FuncDefArgType, []Type) (Type, error)
- func (m *ParameterizedStructType) SetNullability(n Nullability) FuncDefArgType
- func (m *ParameterizedStructType) ShortString() string
- func (m *ParameterizedStructType) String() string
- func (m *ParameterizedStructType) WithParameters(params []interface{}) (Type, error)
- type ParameterizedUserDefinedType
- func (m *ParameterizedUserDefinedType) GetNullability() Nullability
- func (m *ParameterizedUserDefinedType) GetParameterizedParams() []interface{}
- func (m *ParameterizedUserDefinedType) HasParameterizedParam() bool
- func (m *ParameterizedUserDefinedType) MatchWithNullability(ot Type) bool
- func (m *ParameterizedUserDefinedType) MatchWithoutNullability(ot Type) bool
- func (m *ParameterizedUserDefinedType) ReturnType([]FuncDefArgType, []Type) (Type, error)
- func (m *ParameterizedUserDefinedType) SetNullability(n Nullability) FuncDefArgType
- func (m *ParameterizedUserDefinedType) ShortString() string
- func (m *ParameterizedUserDefinedType) String() string
- func (m *ParameterizedUserDefinedType) WithParameters(params []interface{}) (Type, error)
- type ParameterizedVarCharType
- type PrecisionTimestamp
- type PrecisionTimestampType
- func (m *PrecisionTimestampType) BaseString() string
- func (m *PrecisionTimestampType) Equals(rhs Type) bool
- func (m *PrecisionTimestampType) GetNullability() Nullability
- func (m *PrecisionTimestampType) GetParameters() []interface{}
- func (m *PrecisionTimestampType) GetPrecision() TimePrecision
- func (m *PrecisionTimestampType) GetPrecisionProtoVal() int32
- func (m *PrecisionTimestampType) GetReturnType(length int32, nullability Nullability) Type
- func (m *PrecisionTimestampType) GetType() Type
- func (m *PrecisionTimestampType) GetTypeVariationReference() uint32
- func (m *PrecisionTimestampType) ParameterString() string
- func (*PrecisionTimestampType) ShortString() string
- func (m *PrecisionTimestampType) String() string
- func (m *PrecisionTimestampType) ToProto() *proto.Type
- func (m *PrecisionTimestampType) ToProtoFuncArg() *proto.FunctionArgument
- func (m *PrecisionTimestampType) WithNullability(n Nullability) Type
- type PrecisionTimestampTz
- type PrecisionTimestampTzType
- func (m *PrecisionTimestampTzType) BaseString() string
- func (m *PrecisionTimestampTzType) Equals(rhs Type) bool
- func (m *PrecisionTimestampTzType) GetNullability() Nullability
- func (m *PrecisionTimestampTzType) GetParameters() []interface{}
- func (m *PrecisionTimestampTzType) GetReturnType(length int32, nullability Nullability) Type
- func (*PrecisionTimestampTzType) ShortString() string
- func (m *PrecisionTimestampTzType) String() string
- func (m *PrecisionTimestampTzType) ToProto() *proto.Type
- func (m *PrecisionTimestampTzType) ToProtoFuncArg() *proto.FunctionArgument
- func (m *PrecisionTimestampTzType) WithNullability(n Nullability) Type
- type PrimitiveType
- func (s *PrimitiveType[T]) Equals(rhs Type) bool
- func (s *PrimitiveType[T]) GetNullability() Nullability
- func (s *PrimitiveType[T]) GetParameterizedParams() []interface{}
- func (s *PrimitiveType[T]) GetParameters() []interface{}
- func (s *PrimitiveType[T]) GetType() Type
- func (s *PrimitiveType[T]) GetTypeVariationReference() uint32
- func (s *PrimitiveType[T]) HasParameterizedParam() bool
- func (s *PrimitiveType[T]) MatchWithNullability(ot Type) bool
- func (s *PrimitiveType[T]) MatchWithoutNullability(ot Type) bool
- func (s *PrimitiveType[T]) ReturnType([]FuncDefArgType, []Type) (Type, error)
- func (s *PrimitiveType[T]) SetNullability(n Nullability) FuncDefArgType
- func (*PrimitiveType[T]) ShortString() string
- func (s *PrimitiveType[T]) String() string
- func (s *PrimitiveType[T]) ToProtoFuncArg() *proto.FunctionArgument
- func (s *PrimitiveType[T]) WithNullability(n Nullability) Type
- func (s *PrimitiveType[T]) WithParameters([]interface{}) (Type, error)
- type RecordType
- func (r RecordType) AsStructType() *StructType
- func (r RecordType) Concat(other RecordType) RecordType
- func (r RecordType) Equals(other *RecordType) bool
- func (r RecordType) FieldCount() int32
- func (r RecordType) GetFieldRef(index int32) Type
- func (r RecordType) String() string
- func (r RecordType) Types() []Type
- type SortDirection
- type SortKind
- type StringParameter
- type StringType
- type StringUDTParam
- type StructType
- func (*StructType) BaseString() string
- func (t *StructType) Equals(rhs Type) bool
- func (s *StructType) GetNullability() Nullability
- func (s *StructType) GetParameters() []interface{}
- func (s *StructType) GetType() Type
- func (s *StructType) GetTypeVariationReference() uint32
- func (t *StructType) ParameterString() string
- func (*StructType) ShortString() string
- func (t *StructType) String() string
- func (t *StructType) ToProto() *proto.Type
- func (t *StructType) ToProtoFuncArg() *proto.FunctionArgument
- func (s *StructType) WithNullability(n Nullability) Type
- type SymbolInfo
- type Time
- type TimePrecision
- type TimeType
- type Timestamp
- type TimestampType
- type TimestampTz
- type TimestampTzType
- type Type
- type TypeName
- type TypeParam
- type UDTParameter
- type UUID
- type UUIDType
- type UserDefinedLiteral
- type UserDefinedType
- func (t *UserDefinedType) Equals(rhs Type) bool
- func (s *UserDefinedType) GetNullability() Nullability
- func (s *UserDefinedType) GetParameters() []interface{}
- func (s *UserDefinedType) GetType() Type
- func (s *UserDefinedType) GetTypeVariationReference() uint32
- func (*UserDefinedType) ShortString() string
- func (t *UserDefinedType) String() string
- func (t *UserDefinedType) ToProto() *proto.Type
- func (t *UserDefinedType) ToProtoFuncArg() *proto.FunctionArgument
- func (s *UserDefinedType) WithNullability(n Nullability) Type
- type VarChar
- type VarCharType
- type Version
Constants ¶
const ( NullabilityUnspecified = proto.Type_NULLABILITY_UNSPECIFIED NullabilityNullable = proto.Type_NULLABILITY_NULLABLE NullabilityRequired = proto.Type_NULLABILITY_REQUIRED )
const ( AggPhaseUnspecified = proto.AggregationPhase_AGGREGATION_PHASE_UNSPECIFIED AggPhaseInitialToIntermediate = proto.AggregationPhase_AGGREGATION_PHASE_INITIAL_TO_INTERMEDIATE AggPhaseIntermediateToIntermediate = proto.AggregationPhase_AGGREGATION_PHASE_INTERMEDIATE_TO_INTERMEDIATE AggPhaseInitialToResult = proto.AggregationPhase_AGGREGATION_PHASE_INITIAL_TO_RESULT AggPhaseIntermediateToResult = proto.AggregationPhase_AGGREGATION_PHASE_INTERMEDIATE_TO_RESULT )
const ( AggInvocationUnspecified = proto.AggregateFunction_AGGREGATION_INVOCATION_UNSPECIFIED AggInvocationAll = proto.AggregateFunction_AGGREGATION_INVOCATION_ALL AggInvocationDistinct = proto.AggregateFunction_AGGREGATION_INVOCATION_DISTINCT )
const ( SortUnspecified = SortDirection(proto.SortField_SORT_DIRECTION_UNSPECIFIED) SortAscNullsFirst = SortDirection(proto.SortField_SORT_DIRECTION_ASC_NULLS_FIRST) SortAscNullsLast = SortDirection(proto.SortField_SORT_DIRECTION_ASC_NULLS_LAST) SortDescNullsFirst = SortDirection(proto.SortField_SORT_DIRECTION_DESC_NULLS_FIRST) SortDescNullsLast = SortDirection(proto.SortField_SORT_DIRECTION_ASC_NULLS_LAST) SortClustered = SortDirection(proto.SortField_SORT_DIRECTION_CLUSTERED) )
const ( BehaviorUnspecified = proto.Expression_Cast_FAILURE_BEHAVIOR_UNSPECIFIED BehaviorReturnNil = proto.Expression_Cast_FAILURE_BEHAVIOR_RETURN_NULL BehaviorThrowException = proto.Expression_Cast_FAILURE_BEHAVIOR_THROW_EXCEPTION )
Variables ¶
var CommonEnumType = &EnumType{}
Functions ¶
func AreSyncTypeParametersMatching ¶ added in v3.2.0
func AreSyncTypeParametersMatching(funcParameters []FuncDefArgType, argumentTypes []Type) bool
func GetShortTypeName ¶
func GetTypeNameToTypeMap ¶
func TypeToProto ¶
TypeToProto properly constructs the appropriate protobuf message for the given type.
Types ¶
type AggregationInvocation ¶
type AggregationInvocation = proto.AggregateFunction_AggregationInvocation
type AggregationPhase ¶
type AggregationPhase = proto.AggregationPhase
type AnyType ¶
type AnyType struct { Name string TypeVariationRef uint32 Nullability Nullability }
AnyType to represent AnyType, this type is to indicate "any" type of argument This type is not used in function invocation. It is only used in function definition
func (*AnyType) GetNullability ¶
func (m *AnyType) GetNullability() Nullability
func (*AnyType) GetParameterizedParams ¶
func (m *AnyType) GetParameterizedParams() []interface{}
func (*AnyType) HasParameterizedParam ¶
func (*AnyType) MatchWithNullability ¶
func (*AnyType) MatchWithoutNullability ¶
func (*AnyType) ReturnType ¶
func (m *AnyType) ReturnType(funcParameters []FuncDefArgType, argumentTypes []Type) (Type, error)
func (*AnyType) SetNullability ¶
func (m *AnyType) SetNullability(n Nullability) FuncDefArgType
func (*AnyType) ShortString ¶
func (*AnyType) WithParameters ¶
type Assignment ¶
func (Assignment) String ¶
func (a Assignment) String() string
type BinaryExpr ¶
func (BinaryExpr) String ¶
func (b BinaryExpr) String() string
type BinaryType ¶
type BinaryType = PrimitiveType[[]byte]
create type aliases to the generic structs
type BooleanParameter ¶
type BooleanParameter bool
BooleanParameter is a type parameter like <true> for a type.
func (BooleanParameter) Equals ¶
func (b BooleanParameter) Equals(p TypeParam) bool
func (BooleanParameter) ToProto ¶
func (b BooleanParameter) ToProto() *proto.Type_Parameter
type BooleanType ¶
type BooleanType = PrimitiveType[bool]
create type aliases to the generic structs
type CastFailBehavior ¶
type CastFailBehavior = proto.Expression_Cast_FailureBehavior
type CompositeType ¶
type CompositeType interface { Type // ParameterString this returns parameter string // for e.g. parameter decimal<P, S>, ParameterString returns "P,S" ParameterString() string // BaseString this returns long name for parameter string // for e.g. parameter decimal<P, S>, BaseString returns "decimal" BaseString() string }
CompositeType this represents a concrete type having components
type DataTypeParameter ¶
type DataTypeParameter struct {
Type
}
DataTypeParameter is like the i32 in LIST<i32>
func (*DataTypeParameter) Equals ¶
func (d *DataTypeParameter) Equals(p TypeParam) bool
func (*DataTypeParameter) ToProto ¶
func (d *DataTypeParameter) ToProto() *proto.Type_Parameter
type DataTypeUDTParam ¶
type DataTypeUDTParam struct {
Type FuncDefArgType
}
func (*DataTypeUDTParam) MatchWithNullability ¶
func (d *DataTypeUDTParam) MatchWithNullability(param TypeParam) bool
func (*DataTypeUDTParam) MatchWithoutNullability ¶
func (d *DataTypeUDTParam) MatchWithoutNullability(param TypeParam) bool
func (*DataTypeUDTParam) String ¶
func (d *DataTypeUDTParam) String() string
type Decimal ¶
type Decimal = proto.Expression_Literal_Decimal
type DecimalType ¶
type DecimalType struct { Nullability Nullability TypeVariationRef uint32 Scale, Precision int32 }
DecimalType is a decimal type with concrete precision and scale parameters, e.g. Decimal(10, 2).
func (*DecimalType) BaseString ¶
func (*DecimalType) BaseString() string
func (*DecimalType) Equals ¶
func (s *DecimalType) Equals(rhs Type) bool
func (*DecimalType) GetNullability ¶
func (s *DecimalType) GetNullability() Nullability
func (*DecimalType) GetParameters ¶
func (s *DecimalType) GetParameters() []interface{}
func (*DecimalType) GetType ¶
func (s *DecimalType) GetType() Type
func (*DecimalType) GetTypeVariationReference ¶
func (s *DecimalType) GetTypeVariationReference() uint32
func (*DecimalType) ParameterString ¶
func (s *DecimalType) ParameterString() string
func (*DecimalType) ShortString ¶
func (*DecimalType) ShortString() string
func (*DecimalType) String ¶
func (s *DecimalType) String() string
func (*DecimalType) ToProto ¶
func (s *DecimalType) ToProto() *proto.Type
func (*DecimalType) ToProtoFuncArg ¶
func (s *DecimalType) ToProtoFuncArg() *proto.FunctionArgument
func (*DecimalType) WithNullability ¶
func (s *DecimalType) WithNullability(n Nullability) Type
type Enum ¶
type Enum string
func (Enum) ToProtoFuncArg ¶
func (e Enum) ToProtoFuncArg() *proto.FunctionArgument
type EnumParameter ¶
type EnumParameter string
EnumParameter is a type parameter that is some enum value
func (EnumParameter) Equals ¶
func (b EnumParameter) Equals(p TypeParam) bool
func (EnumParameter) ToProto ¶
func (p EnumParameter) ToProto() *proto.Type_Parameter
type EnumType ¶
type EnumType struct { Nullability Nullability TypeVariationRef uint32 Name string Options []string }
EnumType represents an enumeration function parameter. It supports a fixed set of declared string values as constant arguments.
func (*EnumType) GetNullability ¶
func (e *EnumType) GetNullability() Nullability
func (*EnumType) GetParameterizedParams ¶
func (e *EnumType) GetParameterizedParams() []interface{}
func (*EnumType) GetParameters ¶
func (e *EnumType) GetParameters() []interface{}
func (*EnumType) GetTypeVariationReference ¶
func (*EnumType) HasParameterizedParam ¶
func (*EnumType) MatchWithNullability ¶
func (*EnumType) MatchWithoutNullability ¶
func (*EnumType) ReturnType ¶
func (e *EnumType) ReturnType(funcParameters []FuncDefArgType, argumentTypes []Type) (Type, error)
func (*EnumType) SetNullability ¶
func (e *EnumType) SetNullability(n Nullability) FuncDefArgType
func (*EnumType) ShortString ¶
func (*EnumType) ToProtoFuncArg ¶
func (e *EnumType) ToProtoFuncArg() *proto.FunctionArgument
func (*EnumType) WithNullability ¶
func (e *EnumType) WithNullability(n Nullability) Type
func (*EnumType) WithParameters ¶
type FixedBinary ¶
type FixedBinary []byte
type FixedBinaryType ¶
type FixedBinaryType = FixedLenType[FixedBinary]
create type aliases to the generic structs
type FixedCharType ¶
type FixedCharType = FixedLenType[FixedChar]
create type aliases to the generic structs
type FixedLenType ¶
type FixedLenType[T FixedChar | VarChar | FixedBinary] struct { Nullability Nullability TypeVariationRef uint32 Length int32 }
FixedLenType is any of the types which also need to track their specific length as they have a fixed length.
func (*FixedLenType[T]) BaseString ¶
func (s *FixedLenType[T]) BaseString() string
func (*FixedLenType[T]) Equals ¶
func (s *FixedLenType[T]) Equals(rhs Type) bool
func (*FixedLenType[T]) GetLength ¶
func (s *FixedLenType[T]) GetLength() int32
func (*FixedLenType[T]) GetNullability ¶
func (s *FixedLenType[T]) GetNullability() Nullability
func (*FixedLenType[T]) GetParameters ¶
func (s *FixedLenType[T]) GetParameters() []interface{}
func (*FixedLenType[T]) GetReturnType ¶
func (s *FixedLenType[T]) GetReturnType(length int32, nullability Nullability) Type
func (*FixedLenType[T]) GetType ¶
func (s *FixedLenType[T]) GetType() Type
func (*FixedLenType[T]) GetTypeVariationReference ¶
func (s *FixedLenType[T]) GetTypeVariationReference() uint32
func (*FixedLenType[T]) ParameterString ¶
func (s *FixedLenType[T]) ParameterString() string
func (*FixedLenType[T]) ShortString ¶
func (*FixedLenType[T]) ShortString() string
func (*FixedLenType[T]) String ¶
func (s *FixedLenType[T]) String() string
func (*FixedLenType[T]) ToProtoFuncArg ¶
func (s *FixedLenType[T]) ToProtoFuncArg() *proto.FunctionArgument
func (*FixedLenType[T]) WithLength ¶
func (s *FixedLenType[T]) WithLength(length int32) FixedType
func (*FixedLenType[T]) WithNullability ¶
func (s *FixedLenType[T]) WithNullability(n Nullability) Type
type FixedType ¶
type FixedType interface { CompositeType WithLength(int32) FixedType GetLength() int32 }
func FixedTypeNameToType ¶
type Float32Type ¶
type Float32Type = PrimitiveType[float32]
create type aliases to the generic structs
type Float64Type ¶
type Float64Type = PrimitiveType[float64]
create type aliases to the generic structs
type FuncArg ¶
type FuncArg interface { fmt.Stringer ToProtoFuncArg() *proto.FunctionArgument }
FuncArg corresponds to the protobuf FunctionArgument. Anything which could be a function argument should meet this interface. This is either an Expression, a Type, or an Enum (string).
type FuncDefArgType ¶
type FuncDefArgType interface { fmt.Stringer //SetNullability set nullability as given argument SetNullability(Nullability) FuncDefArgType // HasParameterizedParam returns true if the type has at least one parameterized parameters // if all parameters are concrete then it returns false HasParameterizedParam() bool // GetParameterizedParams returns all parameterized parameters // it doesn't return concrete parameters GetParameterizedParams() []interface{} // MatchWithNullability This API return true if Type argument // is compatible with this param otherwise it returns false. // This method expects that nullability of argument is same as this type. MatchWithNullability(ot Type) bool // MatchWithoutNullability This API return true if Type argument // is compatible with this param otherwise it returns false. // This method ignores nullability for matching. MatchWithoutNullability(ot Type) bool ShortString() string GetNullability() Nullability ReturnType(funcParameters []FuncDefArgType, argumentTypes []Type) (Type, error) // WithParameters returns a new instance of this type with the given parameters. // This is used in function return type derivation WithParameters([]interface{}) (Type, error) }
FuncDefArgType this represents a type used in function argument These type can't be present in plan (not serializable)
type FunctionCallExpr ¶
func (FunctionCallExpr) Evaluate ¶
func (f FunctionCallExpr) Evaluate(symbolTable map[string]any) (any, error)
func (FunctionCallExpr) String ¶
func (f FunctionCallExpr) String() string
type FunctionOption ¶
type FunctionOption = proto.FunctionOption
type FunctionRef ¶
type FunctionRef uint32
func (FunctionRef) String ¶
func (f FunctionRef) String() string
type IntegerParameter ¶
type IntegerParameter int64
IntegerParameter is the type parameter like 10 in VARCHAR<10>
func (IntegerParameter) Equals ¶
func (b IntegerParameter) Equals(p TypeParam) bool
func (IntegerParameter) ToProto ¶
func (p IntegerParameter) ToProto() *proto.Type_Parameter
type IntegerUDTParam ¶
type IntegerUDTParam struct {
Integer int32
}
func (*IntegerUDTParam) MatchWithNullability ¶
func (i *IntegerUDTParam) MatchWithNullability(param TypeParam) bool
func (*IntegerUDTParam) MatchWithoutNullability ¶
func (i *IntegerUDTParam) MatchWithoutNullability(param TypeParam) bool
func (*IntegerUDTParam) String ¶
func (i *IntegerUDTParam) String() string
type IntervalCompoundType ¶
type IntervalCompoundType struct {
// contains filtered or unexported fields
}
IntervalCompoundType this is used to represent a type of interval compound.
func NewIntervalCompoundType ¶
func NewIntervalCompoundType() IntervalCompoundType
NewIntervalCompoundType creates a type of new interval compound.
func (IntervalCompoundType) Equals ¶
func (m IntervalCompoundType) Equals(rhs Type) bool
func (IntervalCompoundType) GetNullability ¶
func (m IntervalCompoundType) GetNullability() Nullability
func (IntervalCompoundType) GetParameters ¶
func (m IntervalCompoundType) GetParameters() []interface{}
func (IntervalCompoundType) GetPrecisionProtoVal ¶
func (m IntervalCompoundType) GetPrecisionProtoVal() int32
func (IntervalCompoundType) GetType ¶
func (m IntervalCompoundType) GetType() Type
func (IntervalCompoundType) GetTypeVariationReference ¶
func (m IntervalCompoundType) GetTypeVariationReference() uint32
func (IntervalCompoundType) ShortString ¶
func (IntervalCompoundType) ShortString() string
func (IntervalCompoundType) String ¶
func (m IntervalCompoundType) String() string
func (IntervalCompoundType) ToProto ¶
func (m IntervalCompoundType) ToProto() *proto.Type
func (IntervalCompoundType) ToProtoFuncArg ¶
func (m IntervalCompoundType) ToProtoFuncArg() *proto.FunctionArgument
func (IntervalCompoundType) WithNullability ¶
func (m IntervalCompoundType) WithNullability(n Nullability) Type
func (IntervalCompoundType) WithPrecision ¶
func (m IntervalCompoundType) WithPrecision(precision TimePrecision) IntervalCompoundType
func (IntervalCompoundType) WithTypeVariationRef ¶
func (m IntervalCompoundType) WithTypeVariationRef(typeVariationRef uint32) IntervalCompoundType
type IntervalDayToSecond ¶
type IntervalDayToSecond = proto.Expression_Literal_IntervalDayToSecond
type IntervalDayType ¶
type IntervalDayType struct { Precision TimePrecision TypeVariationRef uint32 Nullability Nullability }
IntervalDayType this is used to represent a type of interval day.
func (*IntervalDayType) BaseString ¶
func (s *IntervalDayType) BaseString() string
func (*IntervalDayType) Equals ¶
func (m *IntervalDayType) Equals(rhs Type) bool
func (*IntervalDayType) GetNullability ¶
func (m *IntervalDayType) GetNullability() Nullability
func (*IntervalDayType) GetParameters ¶
func (m *IntervalDayType) GetParameters() []interface{}
func (*IntervalDayType) GetPrecision ¶
func (m *IntervalDayType) GetPrecision() TimePrecision
func (*IntervalDayType) GetPrecisionProtoVal ¶
func (m *IntervalDayType) GetPrecisionProtoVal() int32
func (*IntervalDayType) GetReturnType ¶
func (m *IntervalDayType) GetReturnType(length int32, nullability Nullability) Type
func (*IntervalDayType) GetType ¶
func (m *IntervalDayType) GetType() Type
func (*IntervalDayType) GetTypeVariationReference ¶
func (m *IntervalDayType) GetTypeVariationReference() uint32
func (*IntervalDayType) ParameterString ¶
func (m *IntervalDayType) ParameterString() string
func (*IntervalDayType) ShortString ¶
func (*IntervalDayType) ShortString() string
func (*IntervalDayType) String ¶
func (m *IntervalDayType) String() string
func (*IntervalDayType) ToProto ¶
func (m *IntervalDayType) ToProto() *proto.Type
func (*IntervalDayType) ToProtoFuncArg ¶
func (m *IntervalDayType) ToProtoFuncArg() *proto.FunctionArgument
func (*IntervalDayType) WithNullability ¶
func (m *IntervalDayType) WithNullability(n Nullability) Type
type IntervalYearToMonth ¶
type IntervalYearToMonth = proto.Expression_Literal_IntervalYearToMonth
type IntervalYearToMonthType ¶
type IntervalYearToMonthType struct {
// contains filtered or unexported fields
}
IntervalYearToMonthType this is used to represent a type of interval which represents YearToMonth.
func NewIntervalYearToMonthType ¶
func NewIntervalYearToMonthType() IntervalYearToMonthType
NewIntervalYearToMonthType creates a type of new interval YearToMonth. Created type has nullability as Nullable
func (IntervalYearToMonthType) Equals ¶
func (m IntervalYearToMonthType) Equals(rhs Type) bool
func (IntervalYearToMonthType) GetNullability ¶
func (m IntervalYearToMonthType) GetNullability() Nullability
func (IntervalYearToMonthType) GetParameters ¶
func (m IntervalYearToMonthType) GetParameters() []interface{}
func (IntervalYearToMonthType) GetType ¶
func (m IntervalYearToMonthType) GetType() Type
func (IntervalYearToMonthType) GetTypeVariationReference ¶
func (m IntervalYearToMonthType) GetTypeVariationReference() uint32
func (IntervalYearToMonthType) ShortString ¶
func (IntervalYearToMonthType) ShortString() string
func (IntervalYearToMonthType) String ¶
func (m IntervalYearToMonthType) String() string
func (IntervalYearToMonthType) ToProto ¶
func (m IntervalYearToMonthType) ToProto() *proto.Type
func (IntervalYearToMonthType) ToProtoFuncArg ¶
func (m IntervalYearToMonthType) ToProtoFuncArg() *proto.FunctionArgument
func (IntervalYearToMonthType) WithNullability ¶
func (m IntervalYearToMonthType) WithNullability(n Nullability) Type
func (IntervalYearToMonthType) WithTypeVariationRef ¶
func (m IntervalYearToMonthType) WithTypeVariationRef(typeVariationRef uint32) IntervalYearToMonthType
type IntervalYearType ¶
type IntervalYearType = PrimitiveType[IntervalYearToMonth]
create type aliases to the generic structs
type ListType ¶
type ListType struct { Nullability Nullability TypeVariationRef uint32 Type Type }
func (*ListType) BaseString ¶
func (*ListType) GetNullability ¶
func (s *ListType) GetNullability() Nullability
func (*ListType) GetParameters ¶
func (s *ListType) GetParameters() []interface{}
func (*ListType) GetTypeVariationReference ¶
func (*ListType) ParameterString ¶
func (*ListType) ShortString ¶
func (*ListType) ToProtoFuncArg ¶
func (t *ListType) ToProtoFuncArg() *proto.FunctionArgument
func (*ListType) WithNullability ¶
func (s *ListType) WithNullability(n Nullability) Type
type LiteralNumber ¶
type LiteralNumber struct {
Value int64
}
func (*LiteralNumber) String ¶
func (l *LiteralNumber) String() string
type MapType ¶
type MapType struct { Nullability Nullability TypeVariationRef uint32 Key, Value Type }
func (*MapType) BaseString ¶
func (*MapType) GetNullability ¶
func (s *MapType) GetNullability() Nullability
func (*MapType) GetParameters ¶
func (s *MapType) GetParameters() []interface{}
func (*MapType) GetTypeVariationReference ¶
func (*MapType) ParameterString ¶
func (*MapType) ShortString ¶
func (*MapType) ToProtoFuncArg ¶
func (t *MapType) ToProtoFuncArg() *proto.FunctionArgument
func (*MapType) WithNullability ¶
func (s *MapType) WithNullability(n Nullability) Type
type NamedStruct ¶
type NamedStruct struct { Names []string Struct StructType }
func NewNamedStructFromProto ¶
func NewNamedStructFromProto(n *proto.NamedStruct) NamedStruct
func (NamedStruct) String ¶
func (n NamedStruct) String() string
func (NamedStruct) ToProto ¶
func (n NamedStruct) ToProto() *proto.NamedStruct
type NullParameter ¶
type NullParameter struct{}
NullParameter is an explicitly null/unspecified parameter, to select the default value (if any).
func (NullParameter) Equals ¶
func (NullParameter) Equals(p TypeParam) bool
func (NullParameter) ToProto ¶
func (NullParameter) ToProto() *proto.Type_Parameter
type Nullability ¶
type Nullability = proto.Type_Nullability
type OutputDerivation ¶
type OutputDerivation struct { Assignments []Assignment FinalType FuncDefArgType }
func (*OutputDerivation) GetNullability ¶
func (m *OutputDerivation) GetNullability() Nullability
func (*OutputDerivation) GetParameterizedParams ¶
func (m *OutputDerivation) GetParameterizedParams() []interface{}
func (*OutputDerivation) HasParameterizedParam ¶
func (m *OutputDerivation) HasParameterizedParam() bool
func (*OutputDerivation) MatchWithNullability ¶
func (m *OutputDerivation) MatchWithNullability(ot Type) bool
func (*OutputDerivation) MatchWithoutNullability ¶
func (m *OutputDerivation) MatchWithoutNullability(ot Type) bool
func (*OutputDerivation) ReturnType ¶
func (m *OutputDerivation) ReturnType(funcParameters []FuncDefArgType, argumentTypes []Type) (Type, error)
func (*OutputDerivation) SetNullability ¶
func (m *OutputDerivation) SetNullability(n Nullability) FuncDefArgType
func (*OutputDerivation) ShortString ¶
func (m *OutputDerivation) ShortString() string
func (*OutputDerivation) String ¶
func (m *OutputDerivation) String() string
func (*OutputDerivation) WithParameters ¶
func (m *OutputDerivation) WithParameters([]interface{}) (Type, error)
type ParameterizedDecimalType ¶
type ParameterizedDecimalType struct { Nullability Nullability TypeVariationRef uint32 Precision integer_parameters.IntegerParameter Scale integer_parameters.IntegerParameter }
ParameterizedDecimalType is a decimal type which to hold function arguments example: Decimal<P,S> or Decimal<P,0> or Decimal(10, 2)
func (*ParameterizedDecimalType) GetNullability ¶
func (m *ParameterizedDecimalType) GetNullability() Nullability
func (*ParameterizedDecimalType) GetParameterizedParams ¶
func (m *ParameterizedDecimalType) GetParameterizedParams() []interface{}
func (*ParameterizedDecimalType) HasParameterizedParam ¶
func (m *ParameterizedDecimalType) HasParameterizedParam() bool
func (*ParameterizedDecimalType) MatchWithNullability ¶
func (m *ParameterizedDecimalType) MatchWithNullability(ot Type) bool
func (*ParameterizedDecimalType) MatchWithoutNullability ¶
func (m *ParameterizedDecimalType) MatchWithoutNullability(ot Type) bool
func (*ParameterizedDecimalType) ReturnType ¶
func (m *ParameterizedDecimalType) ReturnType(parameters []FuncDefArgType, argumentTypes []Type) (Type, error)
func (*ParameterizedDecimalType) SetNullability ¶
func (m *ParameterizedDecimalType) SetNullability(n Nullability) FuncDefArgType
func (*ParameterizedDecimalType) ShortString ¶
func (m *ParameterizedDecimalType) ShortString() string
func (*ParameterizedDecimalType) String ¶
func (m *ParameterizedDecimalType) String() string
func (*ParameterizedDecimalType) WithParameters ¶
func (m *ParameterizedDecimalType) WithParameters(params []interface{}) (Type, error)
type ParameterizedFixedBinaryType ¶
type ParameterizedFixedBinaryType = parameterizedTypeSingleIntegerParam[*FixedBinaryType]
create type aliases to the generic structs
type ParameterizedFixedCharType ¶
type ParameterizedFixedCharType = parameterizedTypeSingleIntegerParam[*FixedCharType]
create type aliases to the generic structs
type ParameterizedIntervalDayType ¶
type ParameterizedIntervalDayType = parameterizedTypeSingleIntegerParam[*IntervalDayType]
create type aliases to the generic structs
type ParameterizedListType ¶
type ParameterizedListType struct { Nullability Nullability TypeVariationRef uint32 Type FuncDefArgType }
ParameterizedListType is a list type having parameter of ParameterizedAbstractType basically a list of which type is another abstract parameter example: List<Decimal(P,S)>. Kindly note concrete types List<Decimal(38, 0)> is not represented by this type Concrete type is represented by ListType
func (*ParameterizedListType) GetNullability ¶
func (m *ParameterizedListType) GetNullability() Nullability
func (*ParameterizedListType) GetParameterizedParams ¶
func (m *ParameterizedListType) GetParameterizedParams() []interface{}
func (*ParameterizedListType) HasParameterizedParam ¶
func (m *ParameterizedListType) HasParameterizedParam() bool
func (*ParameterizedListType) MatchWithNullability ¶
func (m *ParameterizedListType) MatchWithNullability(ot Type) bool
func (*ParameterizedListType) MatchWithoutNullability ¶
func (m *ParameterizedListType) MatchWithoutNullability(ot Type) bool
func (*ParameterizedListType) ReturnType ¶
func (m *ParameterizedListType) ReturnType([]FuncDefArgType, []Type) (Type, error)
func (*ParameterizedListType) SetNullability ¶
func (m *ParameterizedListType) SetNullability(n Nullability) FuncDefArgType
func (*ParameterizedListType) ShortString ¶
func (m *ParameterizedListType) ShortString() string
func (*ParameterizedListType) String ¶
func (m *ParameterizedListType) String() string
func (*ParameterizedListType) WithParameters ¶
func (m *ParameterizedListType) WithParameters(params []interface{}) (Type, error)
type ParameterizedMapType ¶
type ParameterizedMapType struct { Nullability Nullability TypeVariationRef uint32 Key FuncDefArgType Value FuncDefArgType }
ParameterizedMapType is a struct having at least one of key or value of type ParameterizedAbstractType If All arguments are concrete they are represented by MapType
func (*ParameterizedMapType) GetNullability ¶
func (m *ParameterizedMapType) GetNullability() Nullability
func (*ParameterizedMapType) GetParameterizedParams ¶
func (m *ParameterizedMapType) GetParameterizedParams() []interface{}
func (*ParameterizedMapType) HasParameterizedParam ¶
func (m *ParameterizedMapType) HasParameterizedParam() bool
func (*ParameterizedMapType) MatchWithNullability ¶
func (m *ParameterizedMapType) MatchWithNullability(ot Type) bool
func (*ParameterizedMapType) MatchWithoutNullability ¶
func (m *ParameterizedMapType) MatchWithoutNullability(ot Type) bool
func (*ParameterizedMapType) ReturnType ¶
func (m *ParameterizedMapType) ReturnType([]FuncDefArgType, []Type) (Type, error)
func (*ParameterizedMapType) SetNullability ¶
func (m *ParameterizedMapType) SetNullability(n Nullability) FuncDefArgType
func (*ParameterizedMapType) ShortString ¶
func (m *ParameterizedMapType) ShortString() string
func (*ParameterizedMapType) String ¶
func (m *ParameterizedMapType) String() string
func (*ParameterizedMapType) WithParameters ¶
func (m *ParameterizedMapType) WithParameters(params []interface{}) (Type, error)
type ParameterizedPrecisionTimestampType ¶
type ParameterizedPrecisionTimestampType = parameterizedTypeSingleIntegerParam[*PrecisionTimestampType]
create type aliases to the generic structs
type ParameterizedPrecisionTimestampTzType ¶
type ParameterizedPrecisionTimestampTzType = parameterizedTypeSingleIntegerParam[*PrecisionTimestampTzType]
create type aliases to the generic structs
type ParameterizedStructType ¶
type ParameterizedStructType struct { Nullability Nullability TypeVariationRef uint32 Types []FuncDefArgType }
ParameterizedStructType is a parameter type struct example: Struct<Decimal(P,S), INT8> or Struct<INT8>.
func (*ParameterizedStructType) GetNullability ¶
func (m *ParameterizedStructType) GetNullability() Nullability
func (*ParameterizedStructType) GetParameterizedParams ¶
func (m *ParameterizedStructType) GetParameterizedParams() []interface{}
func (*ParameterizedStructType) HasParameterizedParam ¶
func (m *ParameterizedStructType) HasParameterizedParam() bool
func (*ParameterizedStructType) MatchWithNullability ¶
func (m *ParameterizedStructType) MatchWithNullability(ot Type) bool
func (*ParameterizedStructType) MatchWithoutNullability ¶
func (m *ParameterizedStructType) MatchWithoutNullability(ot Type) bool
func (*ParameterizedStructType) ReturnType ¶
func (m *ParameterizedStructType) ReturnType([]FuncDefArgType, []Type) (Type, error)
func (*ParameterizedStructType) SetNullability ¶
func (m *ParameterizedStructType) SetNullability(n Nullability) FuncDefArgType
func (*ParameterizedStructType) ShortString ¶
func (m *ParameterizedStructType) ShortString() string
func (*ParameterizedStructType) String ¶
func (m *ParameterizedStructType) String() string
func (*ParameterizedStructType) WithParameters ¶
func (m *ParameterizedStructType) WithParameters(params []interface{}) (Type, error)
type ParameterizedUserDefinedType ¶
type ParameterizedUserDefinedType struct { Nullability Nullability TypeVariationRef uint32 TypeParameters []UDTParameter Name string }
ParameterizedUserDefinedType is a parameter type struct example: U!point<Decimal(P,S), DECIMAL(P,S)> or U!square<INT8>.
func (*ParameterizedUserDefinedType) GetNullability ¶
func (m *ParameterizedUserDefinedType) GetNullability() Nullability
func (*ParameterizedUserDefinedType) GetParameterizedParams ¶
func (m *ParameterizedUserDefinedType) GetParameterizedParams() []interface{}
func (*ParameterizedUserDefinedType) HasParameterizedParam ¶
func (m *ParameterizedUserDefinedType) HasParameterizedParam() bool
func (*ParameterizedUserDefinedType) MatchWithNullability ¶
func (m *ParameterizedUserDefinedType) MatchWithNullability(ot Type) bool
func (*ParameterizedUserDefinedType) MatchWithoutNullability ¶
func (m *ParameterizedUserDefinedType) MatchWithoutNullability(ot Type) bool
func (*ParameterizedUserDefinedType) ReturnType ¶
func (m *ParameterizedUserDefinedType) ReturnType([]FuncDefArgType, []Type) (Type, error)
func (*ParameterizedUserDefinedType) SetNullability ¶
func (m *ParameterizedUserDefinedType) SetNullability(n Nullability) FuncDefArgType
func (*ParameterizedUserDefinedType) ShortString ¶
func (m *ParameterizedUserDefinedType) ShortString() string
func (*ParameterizedUserDefinedType) String ¶
func (m *ParameterizedUserDefinedType) String() string
func (*ParameterizedUserDefinedType) WithParameters ¶
func (m *ParameterizedUserDefinedType) WithParameters(params []interface{}) (Type, error)
type ParameterizedVarCharType ¶
type ParameterizedVarCharType = parameterizedTypeSingleIntegerParam[*VarCharType]
create type aliases to the generic structs
type PrecisionTimestamp ¶
type PrecisionTimestamp = proto.Expression_Literal_PrecisionTimestamp_
type PrecisionTimestampType ¶
type PrecisionTimestampType struct { Precision TimePrecision TypeVariationRef uint32 Nullability Nullability }
PrecisionTimestampType this is used to represent a type of Precision timestamp
func NewPrecisionTimestampType ¶
func NewPrecisionTimestampType(precision TimePrecision) *PrecisionTimestampType
NewPrecisionTimestampType creates a type of new Precision timestamp. Created type has Nullability as Nullable
func (*PrecisionTimestampType) BaseString ¶
func (m *PrecisionTimestampType) BaseString() string
func (*PrecisionTimestampType) Equals ¶
func (m *PrecisionTimestampType) Equals(rhs Type) bool
func (*PrecisionTimestampType) GetNullability ¶
func (m *PrecisionTimestampType) GetNullability() Nullability
func (*PrecisionTimestampType) GetParameters ¶
func (m *PrecisionTimestampType) GetParameters() []interface{}
func (*PrecisionTimestampType) GetPrecision ¶
func (m *PrecisionTimestampType) GetPrecision() TimePrecision
func (*PrecisionTimestampType) GetPrecisionProtoVal ¶
func (m *PrecisionTimestampType) GetPrecisionProtoVal() int32
func (*PrecisionTimestampType) GetReturnType ¶
func (m *PrecisionTimestampType) GetReturnType(length int32, nullability Nullability) Type
func (*PrecisionTimestampType) GetType ¶
func (m *PrecisionTimestampType) GetType() Type
func (*PrecisionTimestampType) GetTypeVariationReference ¶
func (m *PrecisionTimestampType) GetTypeVariationReference() uint32
func (*PrecisionTimestampType) ParameterString ¶
func (m *PrecisionTimestampType) ParameterString() string
func (*PrecisionTimestampType) ShortString ¶
func (*PrecisionTimestampType) ShortString() string
func (*PrecisionTimestampType) String ¶
func (m *PrecisionTimestampType) String() string
func (*PrecisionTimestampType) ToProto ¶
func (m *PrecisionTimestampType) ToProto() *proto.Type
func (*PrecisionTimestampType) ToProtoFuncArg ¶
func (m *PrecisionTimestampType) ToProtoFuncArg() *proto.FunctionArgument
func (*PrecisionTimestampType) WithNullability ¶
func (m *PrecisionTimestampType) WithNullability(n Nullability) Type
type PrecisionTimestampTz ¶
type PrecisionTimestampTz = proto.Expression_Literal_PrecisionTimestampTz
type PrecisionTimestampTzType ¶
type PrecisionTimestampTzType struct {
PrecisionTimestampType
}
PrecisionTimestampTzType this is used to represent a type of Precision timestamp with TimeZone
func NewPrecisionTimestampTzType ¶
func NewPrecisionTimestampTzType(precision TimePrecision) *PrecisionTimestampTzType
NewPrecisionTimestampTzType creates a type of new Precision timestamp with TimeZone. Created type has Nullability as Nullable
func (*PrecisionTimestampTzType) BaseString ¶
func (m *PrecisionTimestampTzType) BaseString() string
func (*PrecisionTimestampTzType) Equals ¶
func (m *PrecisionTimestampTzType) Equals(rhs Type) bool
func (*PrecisionTimestampTzType) GetNullability ¶
func (m *PrecisionTimestampTzType) GetNullability() Nullability
func (*PrecisionTimestampTzType) GetParameters ¶
func (m *PrecisionTimestampTzType) GetParameters() []interface{}
func (*PrecisionTimestampTzType) GetReturnType ¶
func (m *PrecisionTimestampTzType) GetReturnType(length int32, nullability Nullability) Type
func (*PrecisionTimestampTzType) ShortString ¶
func (*PrecisionTimestampTzType) ShortString() string
func (*PrecisionTimestampTzType) String ¶
func (m *PrecisionTimestampTzType) String() string
func (*PrecisionTimestampTzType) ToProto ¶
func (m *PrecisionTimestampTzType) ToProto() *proto.Type
func (*PrecisionTimestampTzType) ToProtoFuncArg ¶
func (m *PrecisionTimestampTzType) ToProtoFuncArg() *proto.FunctionArgument
func (*PrecisionTimestampTzType) WithNullability ¶
func (m *PrecisionTimestampTzType) WithNullability(n Nullability) Type
type PrimitiveType ¶
type PrimitiveType[T primitiveTypeIFace] struct { Nullability Nullability TypeVariationRef uint32 }
PrimitiveType is a generic implementation of simple primitive types which only need to track if they are nullable and if they are a type variation.
func (*PrimitiveType[T]) Equals ¶
func (s *PrimitiveType[T]) Equals(rhs Type) bool
func (*PrimitiveType[T]) GetNullability ¶
func (s *PrimitiveType[T]) GetNullability() Nullability
func (*PrimitiveType[T]) GetParameterizedParams ¶
func (s *PrimitiveType[T]) GetParameterizedParams() []interface{}
func (*PrimitiveType[T]) GetParameters ¶
func (s *PrimitiveType[T]) GetParameters() []interface{}
func (*PrimitiveType[T]) GetType ¶
func (s *PrimitiveType[T]) GetType() Type
func (*PrimitiveType[T]) GetTypeVariationReference ¶
func (s *PrimitiveType[T]) GetTypeVariationReference() uint32
func (*PrimitiveType[T]) HasParameterizedParam ¶
func (s *PrimitiveType[T]) HasParameterizedParam() bool
func (*PrimitiveType[T]) MatchWithNullability ¶
func (s *PrimitiveType[T]) MatchWithNullability(ot Type) bool
func (*PrimitiveType[T]) MatchWithoutNullability ¶
func (s *PrimitiveType[T]) MatchWithoutNullability(ot Type) bool
func (*PrimitiveType[T]) ReturnType ¶
func (s *PrimitiveType[T]) ReturnType([]FuncDefArgType, []Type) (Type, error)
func (*PrimitiveType[T]) SetNullability ¶
func (s *PrimitiveType[T]) SetNullability(n Nullability) FuncDefArgType
func (*PrimitiveType[T]) ShortString ¶
func (*PrimitiveType[T]) ShortString() string
func (*PrimitiveType[T]) String ¶
func (s *PrimitiveType[T]) String() string
func (*PrimitiveType[T]) ToProtoFuncArg ¶
func (s *PrimitiveType[T]) ToProtoFuncArg() *proto.FunctionArgument
func (*PrimitiveType[T]) WithNullability ¶
func (s *PrimitiveType[T]) WithNullability(n Nullability) Type
func (*PrimitiveType[T]) WithParameters ¶
func (s *PrimitiveType[T]) WithParameters([]interface{}) (Type, error)
type RecordType ¶
type RecordType struct {
// contains filtered or unexported fields
}
RecordType is the type of a record (or row) comprising a list of fields (or columns).
func NewRecordTypeFromStruct ¶
func NewRecordTypeFromStruct(s StructType) *RecordType
func NewRecordTypeFromTypes ¶
func NewRecordTypeFromTypes(types []Type) *RecordType
func (RecordType) AsStructType ¶
func (r RecordType) AsStructType() *StructType
func (RecordType) Concat ¶
func (r RecordType) Concat(other RecordType) RecordType
func (RecordType) Equals ¶
func (r RecordType) Equals(other *RecordType) bool
func (RecordType) FieldCount ¶
func (r RecordType) FieldCount() int32
func (RecordType) GetFieldRef ¶
func (r RecordType) GetFieldRef(index int32) Type
func (RecordType) String ¶
func (r RecordType) String() string
func (RecordType) Types ¶
func (r RecordType) Types() []Type
type SortDirection ¶
type SortDirection proto.SortField_SortDirection
func (SortDirection) String ¶
func (s SortDirection) String() string
type StringParameter ¶
type StringParameter string
StringParameter is a type parameter which is a string value
func (StringParameter) Equals ¶
func (p StringParameter) Equals(o TypeParam) bool
func (StringParameter) Evaluate ¶
func (p StringParameter) Evaluate(symbolTable map[string]any) (any, error)
func (StringParameter) String ¶
func (p StringParameter) String() string
func (StringParameter) ToProto ¶
func (p StringParameter) ToProto() *proto.Type_Parameter
type StringType ¶
type StringType = PrimitiveType[string]
create type aliases to the generic structs
type StringUDTParam ¶
type StringUDTParam struct {
StringVal string
}
func (*StringUDTParam) MatchWithNullability ¶
func (s *StringUDTParam) MatchWithNullability(param TypeParam) bool
func (*StringUDTParam) MatchWithoutNullability ¶
func (s *StringUDTParam) MatchWithoutNullability(param TypeParam) bool
func (*StringUDTParam) String ¶
func (s *StringUDTParam) String() string
type StructType ¶
type StructType struct { Nullability Nullability TypeVariationRef uint32 Types []Type }
func (*StructType) BaseString ¶
func (*StructType) BaseString() string
func (*StructType) Equals ¶
func (t *StructType) Equals(rhs Type) bool
func (*StructType) GetNullability ¶
func (s *StructType) GetNullability() Nullability
func (*StructType) GetParameters ¶
func (s *StructType) GetParameters() []interface{}
func (*StructType) GetType ¶
func (s *StructType) GetType() Type
func (*StructType) GetTypeVariationReference ¶
func (s *StructType) GetTypeVariationReference() uint32
func (*StructType) ParameterString ¶
func (t *StructType) ParameterString() string
func (*StructType) ShortString ¶
func (*StructType) ShortString() string
func (*StructType) String ¶
func (t *StructType) String() string
func (*StructType) ToProto ¶
func (t *StructType) ToProto() *proto.Type
func (*StructType) ToProtoFuncArg ¶
func (t *StructType) ToProtoFuncArg() *proto.FunctionArgument
func (*StructType) WithNullability ¶
func (s *StructType) WithNullability(n Nullability) Type
type SymbolInfo ¶
type TimePrecision ¶
type TimePrecision int32
TimePrecision is used to represent the precision of a timestamp
const ( PrecisionUnknown TimePrecision = -1 // below precision values are proto values PrecisionSeconds TimePrecision = 0 PrecisionDeciSeconds TimePrecision = 1 PrecisionCentiSeconds TimePrecision = 2 PrecisionMilliSeconds TimePrecision = 3 PrecisionEMinus4Seconds TimePrecision = 4 // 10^-4 of seconds PrecisionEMinus5Seconds TimePrecision = 5 // 10^-5 of seconds PrecisionMicroSeconds TimePrecision = 6 PrecisionEMinus7Seconds TimePrecision = 7 // 10^-7 of seconds PrecisionEMinus8Seconds TimePrecision = 8 // 10^-8 of seconds PrecisionNanoSeconds TimePrecision = 9 )
func ProtoToTimePrecision ¶
func ProtoToTimePrecision(val int32) (TimePrecision, error)
func (TimePrecision) ToProtoVal ¶
func (m TimePrecision) ToProtoVal() int32
type TimestampType ¶
type TimestampType = PrimitiveType[Timestamp]
create type aliases to the generic structs
type TimestampTz ¶
type TimestampTz int64
type TimestampTzType ¶
type TimestampTzType = PrimitiveType[TimestampTz]
create type aliases to the generic structs
type Type ¶
type Type interface { FuncArg fmt.Stringer ShortString() string GetType() Type GetNullability() Nullability GetTypeVariationReference() uint32 Equals(Type) bool // WithNullability returns a copy of this type but with // the nullability set to the passed in value WithNullability(Nullability) Type // GetParameters returns all parameters of this type and will be used in function return type derivation GetParameters() []interface{} // contains filtered or unexported methods }
Type corresponds to the proto.Type message and represents a specific type. These are types which can be present in plan (are serializable)
func SimpleTypeNameToType ¶
func TypeFromProto ¶
TypeFromProto returns the appropriate Type object from a protobuf type message.
type TypeName ¶
type TypeName string
const ( TypeNameI8 TypeName = "i8" TypeNameI16 TypeName = "i16" TypeNameI32 TypeName = "i32" TypeNameI64 TypeName = "i64" TypeNameFp32 TypeName = "fp32" TypeNameFp64 TypeName = "fp64" TypeNameString TypeName = "string" TypeNameBinary TypeName = "binary" TypeNameBoolean TypeName = "boolean" TypeNameDate TypeName = "date" TypeNameTime TypeName = "time" TypeNameTimestamp TypeName = "timestamp" TypeNameTimestampTz TypeName = "timestamp_tz" TypeNameIntervalYear TypeName = "interval_year" TypeNameIntervalDay TypeName = "interval_day" TypeNameIntervalCompound TypeName = "interval_compound" TypeNameUUID TypeName = "uuid" TypeNameUDT TypeName = "u!" TypeNameFixedBinary TypeName = "fixedbinary" TypeNameFixedChar TypeName = "fixedchar" TypeNameVarChar TypeName = "varchar" TypeNameDecimal TypeName = "decimal" TypeNamePrecisionTimestamp TypeName = "precision_timestamp" TypeNamePrecisionTimestampTz TypeName = "precision_timestamp_tz" )
type TypeParam ¶
type TypeParam interface { ToProto() *proto.Type_Parameter Equals(TypeParam) bool }
TypeParam represents a type parameter for a user defined type
func TypeParamFromProto ¶
func TypeParamFromProto(p *proto.Type_Parameter) TypeParam
TypeParamFromProto converts a protobuf Type_Parameter message to a TypeParam object for processing.
type UDTParameter ¶
type UserDefinedLiteral ¶
type UserDefinedLiteral = proto.Expression_Literal_UserDefined
type UserDefinedType ¶
type UserDefinedType struct { Nullability Nullability TypeVariationRef uint32 TypeReference uint32 TypeParameters []TypeParam }
func (*UserDefinedType) Equals ¶
func (t *UserDefinedType) Equals(rhs Type) bool
func (*UserDefinedType) GetNullability ¶
func (s *UserDefinedType) GetNullability() Nullability
func (*UserDefinedType) GetParameters ¶
func (s *UserDefinedType) GetParameters() []interface{}
func (*UserDefinedType) GetType ¶
func (s *UserDefinedType) GetType() Type
func (*UserDefinedType) GetTypeVariationReference ¶
func (s *UserDefinedType) GetTypeVariationReference() uint32
func (*UserDefinedType) ShortString ¶
func (*UserDefinedType) ShortString() string
exists for meeting the interface, but the correct short name for a user defined type is "u!name" which requires looking up the type first via the type reference to find the name.
func (*UserDefinedType) String ¶
func (t *UserDefinedType) String() string
func (*UserDefinedType) ToProto ¶
func (t *UserDefinedType) ToProto() *proto.Type
func (*UserDefinedType) ToProtoFuncArg ¶
func (t *UserDefinedType) ToProtoFuncArg() *proto.FunctionArgument
func (*UserDefinedType) WithNullability ¶
func (s *UserDefinedType) WithNullability(n Nullability) Type
type VarChar ¶
type VarChar = proto.Expression_Literal_VarChar
type VarCharType ¶
type VarCharType = FixedLenType[VarChar]
create type aliases to the generic structs
Source Files ¶
- any_type.go
- interval_compound_type.go
- interval_day_type.go
- interval_year_month_type.go
- parameterized_decimal_type.go
- parameterized_list_type.go
- parameterized_map_type.go
- parameterized_single_integer_param_type.go
- parameterized_struct_type.go
- parameterized_user_defined_type.go
- precison_timestamp_types.go
- type_derivation.go
- types.go