Documentation ¶
Index ¶
- Constants
- func GetShortTypeName(name TypeName) string
- func GetTypeNameToTypeMap() map[string]Type
- func TypeToProto(t Type) *proto.Type
- type AggregationInvocation
- type AggregationPhase
- type BinaryType
- type BooleanParameter
- type BooleanType
- type CastFailBehavior
- type DataTypeParameter
- 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) 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 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]) GetNullability() Nullability
- 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 FunctionOption
- type FunctionRef
- type Int16Type
- type Int32Type
- type Int64Type
- type Int8Type
- type IntegerParameter
- type IntervalCompoundType
- func (m IntervalCompoundType) Equals(rhs Type) bool
- func (m IntervalCompoundType) GetNullability() Nullability
- 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
- type IntervalYearToMonth
- type IntervalYearToMonthType
- func (m IntervalYearToMonthType) Equals(rhs Type) bool
- func (m IntervalYearToMonthType) GetNullability() Nullability
- 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 (t *ListType) Equals(rhs Type) bool
- func (s *ListType) GetNullability() Nullability
- func (s *ListType) GetType() Type
- func (s *ListType) GetTypeVariationReference() uint32
- 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 MapType
- func (t *MapType) Equals(rhs Type) bool
- func (s *MapType) GetNullability() Nullability
- func (s *MapType) GetType() Type
- func (s *MapType) GetTypeVariationReference() uint32
- 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 NullParameter
- type Nullability
- type ParameterizedType
- type PrecisionTimestamp
- type PrecisionTimestampType
- func (m *PrecisionTimestampType) Equals(rhs Type) bool
- func (m *PrecisionTimestampType) GetNullability() Nullability
- func (m *PrecisionTimestampType) GetPrecisionProtoVal() int32
- func (m *PrecisionTimestampType) GetType() Type
- func (m *PrecisionTimestampType) GetTypeVariationReference() uint32
- 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) Equals(rhs Type) bool
- 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]) GetType() Type
- func (s *PrimitiveType[T]) GetTypeVariationReference() uint32
- 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
- type SortDirection
- type SortKind
- type StringParameter
- type StringType
- type StructType
- func (t *StructType) Equals(rhs Type) bool
- func (s *StructType) GetNullability() Nullability
- func (s *StructType) GetType() Type
- func (s *StructType) GetTypeVariationReference() uint32
- 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 Time
- type TimePrecision
- type TimeType
- type Timestamp
- type TimestampType
- type TimestampTz
- type TimestampTzType
- type Type
- type TypeName
- type TypeParam
- type UUID
- type UUIDType
- type UserDefinedLiteral
- type UserDefinedType
- func (t *UserDefinedType) Equals(rhs Type) bool
- func (s *UserDefinedType) GetNullability() Nullability
- 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 ¶
This section is empty.
Functions ¶
func GetShortTypeName ¶ added in v0.7.0
func GetTypeNameToTypeMap ¶ added in v0.7.0
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 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 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 Decimal ¶
type Decimal = proto.Expression_Literal_Decimal
type DecimalType ¶
type DecimalType struct { Nullability Nullability TypeVariationRef uint32 Scale, Precision int32 }
func (*DecimalType) BaseString ¶ added in v0.7.0
func (*DecimalType) BaseString() string
func (*DecimalType) Equals ¶
func (s *DecimalType) Equals(rhs Type) bool
func (*DecimalType) GetNullability ¶
func (s *DecimalType) GetNullability() Nullability
func (*DecimalType) GetType ¶
func (s *DecimalType) GetType() Type
func (*DecimalType) GetTypeVariationReference ¶
func (s *DecimalType) GetTypeVariationReference() uint32
func (*DecimalType) ParameterString ¶ added in v0.7.0
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 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 ¶ added in v0.7.0
func (s *FixedLenType[T]) BaseString() string
func (*FixedLenType[T]) Equals ¶
func (s *FixedLenType[T]) Equals(rhs Type) bool
func (*FixedLenType[T]) GetNullability ¶
func (s *FixedLenType[T]) GetNullability() Nullability
func (*FixedLenType[T]) GetType ¶
func (s *FixedLenType[T]) GetType() Type
func (*FixedLenType[T]) GetTypeVariationReference ¶
func (s *FixedLenType[T]) GetTypeVariationReference() uint32
func (*FixedLenType[T]) ParameterString ¶ added in v0.7.0
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 ¶ added in v0.7.0
func (s *FixedLenType[T]) WithLength(length int32) FixedType
func (*FixedLenType[T]) WithNullability ¶
func (s *FixedLenType[T]) WithNullability(n Nullability) Type
type FixedType ¶ added in v0.7.0
type FixedType interface { ParameterizedType WithLength(int32) FixedType }
func FixedTypeNameToType ¶ added in v0.7.0
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 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 IntervalCompoundType ¶ added in v0.8.0
type IntervalCompoundType struct {
// contains filtered or unexported fields
}
IntervalCompoundType this is used to represent a type of interval compound.
func NewIntervalCompoundType ¶ added in v0.8.0
func NewIntervalCompoundType() IntervalCompoundType
NewIntervalCompoundType creates a type of new interval compound.
func (IntervalCompoundType) Equals ¶ added in v0.8.0
func (m IntervalCompoundType) Equals(rhs Type) bool
func (IntervalCompoundType) GetNullability ¶ added in v0.8.0
func (m IntervalCompoundType) GetNullability() Nullability
func (IntervalCompoundType) GetPrecisionProtoVal ¶ added in v0.8.0
func (m IntervalCompoundType) GetPrecisionProtoVal() int32
func (IntervalCompoundType) GetType ¶ added in v0.8.0
func (m IntervalCompoundType) GetType() Type
func (IntervalCompoundType) GetTypeVariationReference ¶ added in v0.8.0
func (m IntervalCompoundType) GetTypeVariationReference() uint32
func (IntervalCompoundType) ShortString ¶ added in v0.8.0
func (IntervalCompoundType) ShortString() string
func (IntervalCompoundType) String ¶ added in v0.8.0
func (m IntervalCompoundType) String() string
func (IntervalCompoundType) ToProto ¶ added in v0.8.0
func (m IntervalCompoundType) ToProto() *proto.Type
func (IntervalCompoundType) ToProtoFuncArg ¶ added in v0.8.0
func (m IntervalCompoundType) ToProtoFuncArg() *proto.FunctionArgument
func (IntervalCompoundType) WithNullability ¶ added in v0.8.0
func (m IntervalCompoundType) WithNullability(n Nullability) Type
func (IntervalCompoundType) WithPrecision ¶ added in v0.8.0
func (m IntervalCompoundType) WithPrecision(precision TimePrecision) IntervalCompoundType
func (IntervalCompoundType) WithTypeVariationRef ¶ added in v0.8.0
func (m IntervalCompoundType) WithTypeVariationRef(typeVariationRef uint32) IntervalCompoundType
type IntervalDayToSecond ¶
type IntervalDayToSecond = proto.Expression_Literal_IntervalDayToSecond
type IntervalDayType ¶
type IntervalDayType = PrimitiveType[IntervalDayToSecond]
create type aliases to the generic structs
type IntervalYearToMonth ¶
type IntervalYearToMonth = proto.Expression_Literal_IntervalYearToMonth
type IntervalYearToMonthType ¶ added in v0.8.0
type IntervalYearToMonthType struct {
// contains filtered or unexported fields
}
IntervalYearToMonthType this is used to represent a type of interval which represents YearToMonth.
func NewIntervalYearToMonthType ¶ added in v0.8.0
func NewIntervalYearToMonthType() IntervalYearToMonthType
NewIntervalYearToMonthType creates a type of new interval YearToMonth. Created type has nullability as Nullable
func (IntervalYearToMonthType) Equals ¶ added in v0.8.0
func (m IntervalYearToMonthType) Equals(rhs Type) bool
func (IntervalYearToMonthType) GetNullability ¶ added in v0.8.0
func (m IntervalYearToMonthType) GetNullability() Nullability
func (IntervalYearToMonthType) GetType ¶ added in v0.8.0
func (m IntervalYearToMonthType) GetType() Type
func (IntervalYearToMonthType) GetTypeVariationReference ¶ added in v0.8.0
func (m IntervalYearToMonthType) GetTypeVariationReference() uint32
func (IntervalYearToMonthType) ShortString ¶ added in v0.8.0
func (IntervalYearToMonthType) ShortString() string
func (IntervalYearToMonthType) String ¶ added in v0.8.0
func (m IntervalYearToMonthType) String() string
func (IntervalYearToMonthType) ToProto ¶ added in v0.8.0
func (m IntervalYearToMonthType) ToProto() *proto.Type
func (IntervalYearToMonthType) ToProtoFuncArg ¶ added in v0.8.0
func (m IntervalYearToMonthType) ToProtoFuncArg() *proto.FunctionArgument
func (IntervalYearToMonthType) WithNullability ¶ added in v0.8.0
func (m IntervalYearToMonthType) WithNullability(n Nullability) Type
func (IntervalYearToMonthType) WithTypeVariationRef ¶ added in v0.8.0
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) GetNullability ¶
func (s *ListType) GetNullability() Nullability
func (*ListType) GetTypeVariationReference ¶
func (*ListType) ShortString ¶
func (*ListType) ToProtoFuncArg ¶
func (t *ListType) ToProtoFuncArg() *proto.FunctionArgument
func (*ListType) WithNullability ¶
func (s *ListType) WithNullability(n Nullability) Type
type MapType ¶
type MapType struct { Nullability Nullability TypeVariationRef uint32 Key, Value Type }
func (*MapType) GetNullability ¶
func (s *MapType) GetNullability() Nullability
func (*MapType) GetTypeVariationReference ¶
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 ParameterizedType ¶ added in v0.7.0
type PrecisionTimestamp ¶ added in v0.7.0
type PrecisionTimestamp = proto.Expression_Literal_PrecisionTimestamp_
type PrecisionTimestampType ¶ added in v0.7.0
type PrecisionTimestampType struct { Precision TimePrecision TypeVariationRef uint32 Nullability Nullability }
PrecisionTimestampType this is used to represent a type of Precision timestamp
func NewPrecisionTimestampType ¶ added in v0.6.0
func NewPrecisionTimestampType(precision TimePrecision) *PrecisionTimestampType
NewPrecisionTimestampType creates a type of new Precision timestamp. Created type has Nullability as Nullable
func (*PrecisionTimestampType) Equals ¶ added in v0.7.0
func (m *PrecisionTimestampType) Equals(rhs Type) bool
func (*PrecisionTimestampType) GetNullability ¶ added in v0.7.0
func (m *PrecisionTimestampType) GetNullability() Nullability
func (*PrecisionTimestampType) GetPrecisionProtoVal ¶ added in v0.7.0
func (m *PrecisionTimestampType) GetPrecisionProtoVal() int32
func (*PrecisionTimestampType) GetType ¶ added in v0.7.0
func (m *PrecisionTimestampType) GetType() Type
func (*PrecisionTimestampType) GetTypeVariationReference ¶ added in v0.7.0
func (m *PrecisionTimestampType) GetTypeVariationReference() uint32
func (*PrecisionTimestampType) ShortString ¶ added in v0.7.0
func (*PrecisionTimestampType) ShortString() string
func (*PrecisionTimestampType) String ¶ added in v0.7.0
func (m *PrecisionTimestampType) String() string
func (*PrecisionTimestampType) ToProto ¶ added in v0.7.0
func (m *PrecisionTimestampType) ToProto() *proto.Type
func (*PrecisionTimestampType) ToProtoFuncArg ¶ added in v0.7.0
func (m *PrecisionTimestampType) ToProtoFuncArg() *proto.FunctionArgument
func (*PrecisionTimestampType) WithNullability ¶ added in v0.7.0
func (m *PrecisionTimestampType) WithNullability(n Nullability) Type
type PrecisionTimestampTz ¶ added in v0.7.0
type PrecisionTimestampTz = proto.Expression_Literal_PrecisionTimestampTz
type PrecisionTimestampTzType ¶ added in v0.7.0
type PrecisionTimestampTzType struct {
PrecisionTimestampType
}
PrecisionTimestampTzType this is used to represent a type of Precision timestamp with TimeZone
func NewPrecisionTimestampTzType ¶ added in v0.6.0
func NewPrecisionTimestampTzType(precision TimePrecision) *PrecisionTimestampTzType
NewPrecisionTimestampTzType creates a type of new Precision timestamp with TimeZone. Created type has Nullability as Nullable
func (*PrecisionTimestampTzType) Equals ¶ added in v0.7.0
func (m *PrecisionTimestampTzType) Equals(rhs Type) bool
func (*PrecisionTimestampTzType) ShortString ¶ added in v0.7.0
func (*PrecisionTimestampTzType) ShortString() string
func (*PrecisionTimestampTzType) String ¶ added in v0.7.0
func (m *PrecisionTimestampTzType) String() string
func (*PrecisionTimestampTzType) ToProto ¶ added in v0.7.0
func (m *PrecisionTimestampTzType) ToProto() *proto.Type
func (*PrecisionTimestampTzType) ToProtoFuncArg ¶ added in v0.7.0
func (m *PrecisionTimestampTzType) ToProtoFuncArg() *proto.FunctionArgument
func (*PrecisionTimestampTzType) WithNullability ¶ added in v0.7.0
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]) GetType ¶
func (s *PrimitiveType[T]) GetType() Type
func (*PrimitiveType[T]) GetTypeVariationReference ¶
func (s *PrimitiveType[T]) GetTypeVariationReference() uint32
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
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 (b StringParameter) Equals(p TypeParam) bool
func (StringParameter) ToProto ¶
func (p StringParameter) ToProto() *proto.Type_Parameter
type StringType ¶
type StringType = PrimitiveType[string]
create type aliases to the generic structs
type StructType ¶
type StructType struct { Nullability Nullability TypeVariationRef uint32 Types []Type }
func (*StructType) Equals ¶
func (t *StructType) Equals(rhs Type) bool
func (*StructType) GetNullability ¶
func (s *StructType) GetNullability() Nullability
func (*StructType) GetType ¶
func (s *StructType) GetType() Type
func (*StructType) GetTypeVariationReference ¶
func (s *StructType) GetTypeVariationReference() uint32
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 TimePrecision ¶ added in v0.6.0
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 ¶ added in v0.6.0
func ProtoToTimePrecision(val int32) (TimePrecision, error)
func (TimePrecision) ToProtoVal ¶ added in v0.6.0
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 // contains filtered or unexported methods }
Type corresponds to the proto.Type message and represents a specific type.
func SimpleTypeNameToType ¶ added in v0.7.0
func TypeFromProto ¶
TypeFromProto returns the appropriate Type object from a protobuf type message.
type TypeName ¶ added in v0.7.0
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" TypeNameUUID TypeName = "uuid" TypeNameFixedBinary TypeName = "fixedbinary" TypeNameFixedChar TypeName = "fixedchar" TypeNameVarChar TypeName = "varchar" TypeNameDecimal TypeName = "decimal" )
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 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) 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