Documentation ¶
Index ¶
Constants ¶
const ( // None represents an unknown data type. // This is mainly used to indicate that the type of a column should be auto detected. None DataType = "" // Int translates into the Go int type. Missing values cannot be represented explicitly. Int = "int" // String translates into the Go *string type. nil represents a missing value. // Internally a string currently has an overhead of eight bytes (64 bits) in // addition to the bytes actually used to hold the string. String = "string" // Float translates into the Go float64 type. NaN represents a missing value. Float = "float" // Bool translates into the Go bool type. Missing values cannot be represented explicitly. Bool = "bool" // Enum translates into the Go *string type. nil represents a missing value. // An enum column can, at most, have 254 distinct values. Enum = "enum" // Undefined represents an unspecified data type. // This is used for zero length columns where the datatype could not be identified. Undefined DataType = "Undefined" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnName ¶
type ColumnName string
ColumnName is used to separate a column identifier from a string constant. It is used when filtering and evaluating expressions where ambiguities would otherwise arise.
type DataFuncOrBuiltInId ¶
type DataFuncOrBuiltInId = interface{}
DataFuncOrBuiltInId can be a function taking one argument of type T and returning a value of type U.
For example:
func(x float64) float64 func(x float64) int
Or it can be a function taking zero arguments returning a value of type T.
For example:
func() float64 func() int
Or it can be a function taking two arguments of type T and returning a value of type T. Note that arguments and return values must all have the same type in this case.
For example:
func(x, y float64) float64 func(x, y int) int
Or it can be a string identifying a built in function.
For example:
"abs"
IMPORTANT: Pointer arguments (eg. *string) must never be assumed to be valid after that the passed function returns. Under the hood reuse and other performance enhancements may trigger unexpected behaviour if this is ever done. If, for some reason, you want to retain the data a copy must be made.
type DataSlice ¶
type DataSlice = interface{}
DataSlice can be a slice of any of the supported data types.
The following types are currently supported:
[]bool []float64 []int []string []*string
type FunctionType ¶
type FunctionType byte
FunctionType represents the different types of input that functions operating on columns can take.
const ( FunctionTypeUndefined FunctionType = iota FunctionTypeInt FunctionTypeFloat FunctionTypeBool FunctionTypeString )
func (FunctionType) String ¶
func (t FunctionType) String() string
type SliceFuncOrBuiltInId ¶
type SliceFuncOrBuiltInId = interface{}
SliceFuncOrBuiltInId can be a function taking a slice of type T and returning a value of type T.
For example:
func(x []float64) float64 func(x []int) int func(x []*string) *string func(x []bool) bool
Or it can be a string identifying a built in function.
For example:
"sum"
IMPORTANT: Reference arguments (eg. slices) must never be assumed to be valid after that the passed function returns. Under the hood reuse and other performance enhancements may trigger unexpected behaviour if this is ever done. If, for some reason, you want to retain the data a copy must be made.