-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.go
78 lines (59 loc) · 1.26 KB
/
types.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package value
import (
"github.com/deepfabric/vectorsql/pkg/vm/types"
"github.com/pilosa/pilosa/roaring"
)
type Values interface {
Size() int
Show() ([]byte, error)
Read(int, []byte) error
Count() int
Slice() ([]uint64, [][]byte)
Filter([]uint64) interface{}
MergeFilter(interface{}) interface{}
MarkNull(int) error
Append(interface{}) error
Update([]int, interface{}) error
Merge(*roaring.Bitmap, *roaring.Bitmap) error
}
type Value interface {
Size() int
String() string
Compare(Value) int
ResolvedType() types.T
IsLogical() bool
IsAndOnly() bool
ReturnType() uint32
Attributes() []string
Eval(map[string]Values) (Values, uint32, error)
}
type Bool bool // true = 1, false = 0
type Int int64
type Float float64
type String string
type Uint8 uint8
type Uint16 uint16
type Uint32 uint32
type Uint64 uint64
type Int8 int8
type Int16 int16
type Int32 int32
type Int64 int64
type Float32 float32
type Float64 float64
type Null struct{}
type Array []Value
type Data uint32
type Time uint32 // 0 ~ 24 * 3600
type Timestamp int64
var (
ConstTrue Bool = true
ConstFalse Bool = false
ConstNull Null = Null{}
)
// time.Time formats.
const (
TimeOutputFormat = "00:00:00"
DataOutputFormat = "0000-00-00"
TimestampOutputFormat = "2006-01-02 15:04:05"
)