Memory mapped column oriented tables for Go.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
891 B

package mmtable
import "reflect"
type ElemType byte
const (
ElemTypeByte ElemType = 0
ElemTypeBool ElemType = 1
ElemTypeInt8 ElemType = 2
ElemTypeInt16 ElemType = 3
ElemTypeInt32 ElemType = 4
ElemTypeInt64 ElemType = 5
ElemTypeUint8 ElemType = 6
ElemTypeUint16 ElemType = 7
ElemTypeUint32 ElemType = 8
ElemTypeUint64 ElemType = 9
ElemTypeFloat32 ElemType = 10
ElemTypeFloat64 ElemType = 11
elemTypeMax ElemType = 12
)
func elemTypeIsValid(t ElemType) bool {
return t < elemTypeMax
}
var nativeElemType = []reflect.Type{
reflect.TypeOf(byte(0)),
reflect.TypeOf(false),
reflect.TypeOf(int8(0)),
reflect.TypeOf(int16(0)),
reflect.TypeOf(int32(0)),
reflect.TypeOf(int64(0)),
reflect.TypeOf(uint8(0)),
reflect.TypeOf(uint16(0)),
reflect.TypeOf(uint32(0)),
reflect.TypeOf(uint64(0)),
reflect.TypeOf(float32(0)),
reflect.TypeOf(float64(0)),
}