Documentation ¶
Index ¶
- Variables
- type StructField
- type Type
- type TypeID
- type TypeRelation
- type Value
- func NewBoolean(value bool) Value
- func NewDuration(value time.Duration) Value
- func NewFloat(value float64) Value
- func NewInt(value int) Value
- func NewList(value []Value) Value
- func NewNull() Value
- func NewString(value string) Value
- func NewStruct(value []Value) Value
- func NewTime(value time.Time) Value
- func NewTuple(values []Value) Value
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Null = Type{TypeID: TypeIDNull} Int = Type{TypeID: TypeIDInt} Float = Type{TypeID: TypeIDFloat} Boolean = Type{TypeID: TypeIDBoolean} String = Type{TypeID: TypeIDString} Time = Type{TypeID: TypeIDTime} Duration = Type{TypeID: TypeIDDuration} Any = Type{TypeID: TypeIDAny} )
View Source
var ZeroValue = Value{}
Functions ¶
This section is empty.
Types ¶
type StructField ¶
type Type ¶
type Type struct { TypeID TypeID Null struct{} Int struct{} Float struct{} Boolean struct{} Str struct{} Time struct{} Duration struct{} List struct { Element *Type } Struct struct { Fields []StructField // TODO: -> Names []string, Types []Type } Tuple struct { Elements []Type } Union struct { Alternatives []Type } Any struct{} }
func NonNullable ¶ added in v0.5.0
NonNullable returns a type that is the same as the input type, but without nullability. If the input type is just Null, then this returns Null as well.
func TypeIntersection ¶
func (Type) Is ¶
func (t Type) Is(other Type) TypeRelation
type TypeRelation ¶
type TypeRelation int
const ( TypeRelationIsnt TypeRelation = iota TypeRelationMaybe TypeRelationIs )
type Value ¶
type Value struct { TypeID TypeID Int int Float float64 Boolean bool Str string Time time.Time Duration time.Duration List []Value Struct []Value Tuple []Value }
Value represents a single row value. The zero value of it is conveniently NULL.
func NewBoolean ¶
func NewDuration ¶
func (Value) ToRawGoValue ¶
Click to show internal directories.
Click to hide internal directories.