Documentation ¶
Index ¶
- type Base
- type BaseBuilder
- type BaseRef
- type Boolean
- type BooleanBuilder
- type BooleanRef
- type Float
- type FloatBuilder
- type FloatRef
- type Int
- type IntBuilder
- type IntRef
- type String
- type StringBuilder
- type StringRef
- type Time
- type TimeBuilder
- type TimeRef
- type UInt
- type UIntBuilder
- type UIntRef
- type ValueBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base interface { BaseRef // Free will release the memory for this array. After Free is called, // the array should no longer be used. Free() }
Base defines the base interface for working with any array type. All array types share this common interface.
type BaseBuilder ¶
type BaseBuilder interface { // Type returns the type of values that this builder accepts. Type() semantic.Type // Len returns the currently allocated length for the array builder. Len() int // Cap returns the current capacity of the underlying array. Cap() int // Reserve ensures there is enough space for appending n elements by checking // the capacity and calling resize if necessary. Reserve(n int) // AppendNull will append a null value to the array. AppendNull() // BuildArray will construct the array. BuildArray() Base // Free will release the memory used for this builder. Free() }
BaseBuilder defines the base interface for building an array of a given array type. All builder types share this common interface.
type BaseRef ¶ added in v0.7.1
type BaseRef interface { // Type returns the type of values that this array contains. Type() semantic.Type // IsNull will return true if the given index is null. IsNull(i int) bool // IsValid will return true if the given index is a valid value (not null). IsValid(i int) bool // Len will return the length of this array. Len() int // NullN will return the number of null values in this array. NullN() int // Slice will return a slice of the array. Slice(start, stop int) BaseRef // Copy will retain a reference to the array. Copy() Base }
BaseRef defines the base interface for working with an array interface.
type Boolean ¶
type Boolean interface { BooleanRef // Free will release the memory for this array. After Free is called, // the array should no longer be used. Free() }
Boolean represents an abstraction over a bool array.
type BooleanBuilder ¶
type BooleanBuilder interface { BaseBuilder Append(v bool) AppendValues(v []bool, valid ...[]bool) // BuildBooleanArray will construct the array. BuildBooleanArray() Boolean }
BooleanBuilder represents an abstraction over building a bool array.
type BooleanRef ¶ added in v0.7.1
type BooleanRef interface { BaseRef Value(i int) bool BooleanSlice(start, stop int) BooleanRef }
BooleanRef is a reference to a Boolean.
type Float ¶
type Float interface { FloatRef // Free will release the memory for this array. After Free is called, // the array should no longer be used. Free() }
Float represents an abstraction over a float array.
type FloatBuilder ¶
type FloatBuilder interface { BaseBuilder Append(v float64) AppendValues(v []float64, valid ...[]bool) // BuildFloatArray will construct the array. BuildFloatArray() Float }
FloatBuilder represents an abstraction over building a float array.
type FloatRef ¶ added in v0.7.1
type FloatRef interface { BaseRef Value(i int) float64 FloatSlice(start, stop int) FloatRef // Float64Values will return the underlying slice for the Float array. It is the size // of the array and null values will be present, but the data at null indexes will be invalid. Float64Values() []float64 }
FloatRef is a reference to a Float.
type Int ¶
type Int interface { IntRef // Free will release the memory for this array. After Free is called, // the array should no longer be used. Free() }
Int represents an abstraction over an integer array.
type IntBuilder ¶
type IntBuilder interface { BaseBuilder Append(v int64) AppendValues(v []int64, valid ...[]bool) // BuildIntArray will construct the array. BuildIntArray() Int }
IntBuilder represents an abstraction over building a int array.
type IntRef ¶ added in v0.7.1
type IntRef interface { BaseRef Value(i int) int64 IntSlice(start, stop int) IntRef // Int64Values will return the underlying slice for the Int array. It is the size // of the array and null values will be present, but the data at null indexes will be invalid. Int64Values() []int64 }
IntRef is a reference to an Int.
type String ¶
type String interface { StringRef // Free will release the memory for this array. After Free is called, // the array should no longer be used. Free() }
String represents an abstraction over a string array.
type StringBuilder ¶
type StringBuilder interface { BaseBuilder Append(v string) AppendValues(v []string, valid ...[]bool) // BuildStringArray will construct the array. BuildStringArray() String }
StringBuilder represents an abstraction over building a string array.
type Time ¶
type Time interface { TimeRef // Free will release the memory for this array. After Free is called, // the array should no longer be used. Free() }
Time represents an abstraction over a time array.
type TimeBuilder ¶
type TimeBuilder interface { BaseBuilder Append(v values.Time) AppendValues(v []values.Time, valid ...[]bool) // BuildTimeArray will construct the array. BuildTimeArray() Time }
TimeBuilder represents an abstraction over building a time array.
type UInt ¶
type UInt interface { UIntRef // Free will release the memory for this array. After Free is called, // the array should no longer be used. Free() }
UInt represents an abstraction over an unsigned array.
type UIntBuilder ¶
type UIntBuilder interface { BaseBuilder Append(v uint64) AppendValues(v []uint64, valid ...[]bool) // BuildUIntArray will construct the array. BuildUIntArray() UInt }
UIntBuilder represents an abstraction over building a uint array.
type UIntRef ¶ added in v0.7.1
type UIntRef interface { BaseRef Value(i int) uint64 UIntSlice(start, stop int) UIntRef // Uint64Values will return the underlying slice for the UInt array. It is the size // of the array and null values will be present, but the data at null indexes will be invalid. Uint64Values() []uint64 }
UIntRef is a reference to a UInt.
type ValueBuilder ¶ added in v0.7.1
type ValueBuilder struct { // Builder holds the BaseBuilder that will be used. Builder BaseBuilder }
ValueBuilder is a wrapper around the various builders that allows appending to a builder using values.Value types.
func (*ValueBuilder) AppendNull ¶ added in v0.7.1
func (b *ValueBuilder) AppendNull()
func (*ValueBuilder) BuildArray ¶ added in v0.7.1
func (b *ValueBuilder) BuildArray() Base
func (*ValueBuilder) Cap ¶ added in v0.7.1
func (b *ValueBuilder) Cap() int
func (*ValueBuilder) Len ¶ added in v0.7.1
func (b *ValueBuilder) Len() int
func (*ValueBuilder) Reserve ¶ added in v0.7.1
func (b *ValueBuilder) Reserve(n int)
func (*ValueBuilder) Type ¶ added in v0.7.1
func (b *ValueBuilder) Type() semantic.Type