forked from goccy/go-zetasqlite
/
codec.go
31 lines (27 loc) · 885 Bytes
/
codec.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package internal
type ValueType string
const (
IntValueType ValueType = "int64"
StringValueType ValueType = "string"
BytesValueType ValueType = "bytes"
FloatValueType ValueType = "float"
NumericValueType ValueType = "numeric"
BigNumericValueType ValueType = "bignumeric"
BoolValueType ValueType = "bool"
JsonValueType ValueType = "json"
ArrayValueType ValueType = "array"
StructValueType ValueType = "struct"
DateValueType ValueType = "date"
DatetimeValueType ValueType = "datetime"
TimeValueType ValueType = "time"
TimestampValueType ValueType = "timestamp"
IntervalValueType ValueType = "interval"
)
type ValueLayout struct {
Header ValueType `json:"header"`
Body string `json:"body"`
}
type StructValueLayout struct {
Keys []string `json:"keys"`
Values []interface{} `json:"values"`
}