/
enums.go
534 lines (480 loc) · 16.7 KB
/
enums.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
package tiledb
/*
#cgo CFLAGS: -I/usr/local/include
#cgo LDFLAGS: -ltiledb
#cgo linux LDFLAGS: -ldl
#include <tiledb/tiledb.h>
#include <tiledb/tiledb_enum.h>
#include <tiledb/tiledb_serialization.h>
#include <stdlib.h>
*/
import "C"
import (
"encoding/json"
"fmt"
"reflect"
"unsafe"
)
// ArrayType enum for tiledb arrays
type ArrayType int8
const (
// TILEDB_DENSE dense array
TILEDB_DENSE ArrayType = C.TILEDB_DENSE
// TILEDB_SPARSE dense array
TILEDB_SPARSE ArrayType = C.TILEDB_SPARSE
)
// Datatype
type Datatype int8
const (
// TILEDB_INT32 32-bit signed integer
TILEDB_INT32 Datatype = C.TILEDB_INT32
// TILEDB_INT64 64-bit signed integer
TILEDB_INT64 Datatype = C.TILEDB_INT64
// TILEDB_FLOAT32 32-bit floating point value
TILEDB_FLOAT32 Datatype = C.TILEDB_FLOAT32
// TILEDB_FLOAT64 64-bit floating point value
TILEDB_FLOAT64 Datatype = C.TILEDB_FLOAT64
// TILEDB_CHAR Character
TILEDB_CHAR Datatype = C.TILEDB_CHAR
// TILEDB_INT8 8-bit signed integer
TILEDB_INT8 Datatype = C.TILEDB_INT8
// TILEDB_UINT8 8-bit unsigned integer
TILEDB_UINT8 Datatype = C.TILEDB_UINT8
// TILEDB_INT16 16-bit signed integer
TILEDB_INT16 Datatype = C.TILEDB_INT16
// TILEDB_UINT16 16-bit unsigned integer
TILEDB_UINT16 Datatype = C.TILEDB_UINT16
// TILEDB_UINT32 32-bit unsigned integer
TILEDB_UINT32 Datatype = C.TILEDB_UINT32
// TILEDB_UINT64 64-bit unsigned integer
TILEDB_UINT64 Datatype = C.TILEDB_UINT64
// TILEDB_STRING_ASCII ASCII string
TILEDB_STRING_ASCII Datatype = C.TILEDB_STRING_ASCII
// TILEDB_STRING_UTF8 UTF-8 string
TILEDB_STRING_UTF8 Datatype = C.TILEDB_STRING_UTF8
// TILEDB_STRING_UTF16 UTF-16 string
TILEDB_STRING_UTF16 Datatype = C.TILEDB_STRING_UTF16
// TILEDB_STRING_UTF32 UTF-32 string
TILEDB_STRING_UTF32 Datatype = C.TILEDB_STRING_UTF32
// TILEDB_STRING_UCS2 UCS2 string
TILEDB_STRING_UCS2 Datatype = C.TILEDB_STRING_UCS2
// TILEDB_STRING_UCS4 UCS4 string
TILEDB_STRING_UCS4 Datatype = C.TILEDB_STRING_UCS4
// TILEDB_ANY This can be any datatype. Must store (type tag, value) pairs.
TILEDB_ANY Datatype = C.TILEDB_ANY
// TILEDB_DATETIME_YEAR 64-bit signed integer representing year
TILEDB_DATETIME_YEAR Datatype = C.TILEDB_DATETIME_YEAR
// TILEDB_DATETIME_MONTH 64-bit signed integer representing month
TILEDB_DATETIME_MONTH Datatype = C.TILEDB_DATETIME_MONTH
// TILEDB_DATETIME_WEEK 64-bit signed integer representing week
TILEDB_DATETIME_WEEK Datatype = C.TILEDB_DATETIME_WEEK
// TILEDB_DATETIME_DAY 64-bit signed integer representing day
TILEDB_DATETIME_DAY Datatype = C.TILEDB_DATETIME_DAY
// TILEDB_DATETIME_HR 64-bit signed integer representing hour
TILEDB_DATETIME_HR Datatype = C.TILEDB_DATETIME_HR
// TILEDB_DATETIME_MIN 64-bit signed integer representing minute
TILEDB_DATETIME_MIN Datatype = C.TILEDB_DATETIME_MIN
// TILEDB_DATETIME_SEC 64-bit signed integer representing second
TILEDB_DATETIME_SEC Datatype = C.TILEDB_DATETIME_SEC
// TILEDB_DATETIME_MS 64-bit signed integer representing ms
TILEDB_DATETIME_MS Datatype = C.TILEDB_DATETIME_MS
// TILEDB_DATETIME_US 64-bit signed integer representing us
TILEDB_DATETIME_US Datatype = C.TILEDB_DATETIME_US
// TILEDB_DATETIME_NS 64-bit signed integer representing ns
TILEDB_DATETIME_NS Datatype = C.TILEDB_DATETIME_NS
// TILEDB_DATETIME_PS 64-bit signed integer representing ps
TILEDB_DATETIME_PS Datatype = C.TILEDB_DATETIME_PS
// TILEDB_DATETIME_FS 64-bit signed integer representing fs
TILEDB_DATETIME_FS Datatype = C.TILEDB_DATETIME_FS
// TILEDB_DATETIME_AS 64-bit signed integer representing as
TILEDB_DATETIME_AS Datatype = C.TILEDB_DATETIME_AS
)
// String returns string representation
func (d Datatype) String() string {
var cname *C.char
defer C.free(unsafe.Pointer(cname))
C.tiledb_datatype_to_str(C.tiledb_datatype_t(d), &cname)
return C.GoString(cname)
}
// MarshalJSON interface for marshaling to json
func (d Datatype) MarshalJSON() ([]byte, error) {
return json.Marshal(d.String())
}
// UnmarshalJSON interface for unmarshaling from json
func (d *Datatype) UnmarshalJSON(bytes []byte) error {
return d.FromString(string(bytes))
}
// FromString converts from a datatype string to enum
func (d *Datatype) FromString(s string) error {
cname := C.CString(s)
defer C.free(unsafe.Pointer(cname))
var cDatatype C.tiledb_datatype_t
ret := C.tiledb_datatype_from_str(cname, &cDatatype)
if ret != C.TILEDB_OK {
return fmt.Errorf("%s is not a recognized tiledb_datatype_t", s)
}
*d = Datatype(cDatatype)
return nil
}
// DatatypeFromString converts from a datatype string to enum
func DatatypeFromString(s string) (Datatype, error) {
var d Datatype
err := d.FromString(s)
if err != nil {
return TILEDB_ANY, err
}
return d, nil
}
// ReflectKind returns the reflect kind given a datatype
func (d Datatype) ReflectKind() reflect.Kind {
switch d {
case TILEDB_INT8:
return reflect.Int8
case TILEDB_INT16:
return reflect.Int16
case TILEDB_INT32:
return reflect.Int32
case TILEDB_INT64:
return reflect.Int64
case TILEDB_UINT8:
return reflect.Uint8
case TILEDB_UINT16:
return reflect.Uint16
case TILEDB_UINT32:
return reflect.Uint32
case TILEDB_UINT64:
return reflect.Uint64
case TILEDB_FLOAT32:
return reflect.Float32
case TILEDB_FLOAT64:
return reflect.Float64
case TILEDB_CHAR:
return reflect.Uint8
case TILEDB_STRING_ASCII:
return reflect.Uint8
case TILEDB_STRING_UTF8:
return reflect.Uint8
case TILEDB_STRING_UTF16:
return reflect.Uint16
case TILEDB_STRING_UTF32:
return reflect.Uint32
case TILEDB_STRING_UCS2:
return reflect.Uint16
case TILEDB_STRING_UCS4:
return reflect.Uint32
case TILEDB_ANY:
return reflect.Interface
case TILEDB_DATETIME_YEAR, TILEDB_DATETIME_MONTH, TILEDB_DATETIME_WEEK, TILEDB_DATETIME_DAY, TILEDB_DATETIME_HR, TILEDB_DATETIME_MIN, TILEDB_DATETIME_SEC, TILEDB_DATETIME_MS, TILEDB_DATETIME_US, TILEDB_DATETIME_NS, TILEDB_DATETIME_PS, TILEDB_DATETIME_FS, TILEDB_DATETIME_AS:
return reflect.Int64
default:
return reflect.Interface
}
}
// Size returns the datatype size in bytes
func (d Datatype) Size() uint64 {
return uint64(C.tiledb_datatype_size(C.tiledb_datatype_t(d)))
}
// MakeSlice makes a slice of the correct type corresponding to the datatype, with a given number of elements
func (d Datatype) MakeSlice(numElements uint64) (interface{}, unsafe.Pointer, error) {
switch d {
case TILEDB_INT8:
slice := make([]int8, numElements)
return slice, unsafe.Pointer(&slice[0]), nil
case TILEDB_INT16:
slice := make([]int16, numElements)
return slice, unsafe.Pointer(&slice[0]), nil
case TILEDB_INT32:
slice := make([]int32, numElements)
return slice, unsafe.Pointer(&slice[0]), nil
case TILEDB_INT64, TILEDB_DATETIME_YEAR, TILEDB_DATETIME_MONTH, TILEDB_DATETIME_WEEK, TILEDB_DATETIME_DAY, TILEDB_DATETIME_HR, TILEDB_DATETIME_MIN, TILEDB_DATETIME_SEC, TILEDB_DATETIME_MS, TILEDB_DATETIME_US, TILEDB_DATETIME_NS, TILEDB_DATETIME_PS, TILEDB_DATETIME_FS, TILEDB_DATETIME_AS:
slice := make([]int64, numElements)
return slice, unsafe.Pointer(&slice[0]), nil
case TILEDB_UINT8, TILEDB_CHAR, TILEDB_STRING_ASCII, TILEDB_STRING_UTF8:
slice := make([]uint8, numElements)
return slice, unsafe.Pointer(&slice[0]), nil
case TILEDB_UINT16, TILEDB_STRING_UTF16, TILEDB_STRING_UCS2:
slice := make([]uint16, numElements)
return slice, unsafe.Pointer(&slice[0]), nil
case TILEDB_UINT32, TILEDB_STRING_UTF32, TILEDB_STRING_UCS4:
slice := make([]uint32, numElements)
return slice, unsafe.Pointer(&slice[0]), nil
case TILEDB_UINT64:
slice := make([]uint64, numElements)
return slice, unsafe.Pointer(&slice[0]), nil
case TILEDB_FLOAT32:
slice := make([]float32, numElements)
return slice, unsafe.Pointer(&slice[0]), nil
case TILEDB_FLOAT64:
slice := make([]float64, numElements)
return slice, unsafe.Pointer(&slice[0]), nil
default:
return nil, nil, fmt.Errorf("error making datatype slice; unrecognized datatype: %d", d)
}
}
// GetValue gets value stored in a void pointer for this data type
func (d Datatype) GetValue(valueNum uint, cvalue unsafe.Pointer) (interface{}, error) {
var value interface{}
switch d {
case TILEDB_INT8:
if valueNum > 1 {
tmpValue := make([]int8, valueNum)
tmpslice := (*[1 << 46]C.int8_t)(unsafe.Pointer(cvalue))[:valueNum:valueNum]
for i, s := range tmpslice {
tmpValue[i] = int8(s)
}
value = tmpValue
} else {
value = *(*int8)(unsafe.Pointer(cvalue))
}
case TILEDB_INT16:
if valueNum > 1 {
tmpValue := make([]int16, valueNum)
tmpslice := (*[1 << 46]C.int16_t)(unsafe.Pointer(cvalue))[:valueNum:valueNum]
for i, s := range tmpslice {
tmpValue[i] = int16(s)
}
value = tmpValue
} else {
value = *(*int16)(unsafe.Pointer(cvalue))
}
case TILEDB_INT32:
if valueNum > 1 {
tmpValue := make([]int32, valueNum)
tmpslice := (*[1 << 46]C.int32_t)(unsafe.Pointer(cvalue))[:valueNum:valueNum]
for i, s := range tmpslice {
tmpValue[i] = int32(s)
}
value = tmpValue
} else {
value = *(*int32)(unsafe.Pointer(cvalue))
}
case TILEDB_INT64:
if valueNum > 1 {
tmpValue := make([]int64, valueNum)
tmpslice := (*[1 << 46]C.int64_t)(unsafe.Pointer(cvalue))[:valueNum:valueNum]
for i, s := range tmpslice {
tmpValue[i] = int64(s)
}
value = tmpValue
} else {
value = *(*int64)(unsafe.Pointer(cvalue))
}
case TILEDB_UINT8:
if valueNum > 1 {
tmpValue := make([]uint8, valueNum)
tmpslice := (*[1 << 46]C.uint8_t)(unsafe.Pointer(cvalue))[:valueNum:valueNum]
for i, s := range tmpslice {
tmpValue[i] = uint8(s)
}
value = tmpValue
} else {
value = *(*uint8)(unsafe.Pointer(cvalue))
}
case TILEDB_UINT16:
if valueNum > 1 {
tmpValue := make([]uint16, valueNum)
tmpslice := (*[1 << 46]C.uint16_t)(unsafe.Pointer(cvalue))[:valueNum:valueNum]
for i, s := range tmpslice {
tmpValue[i] = uint16(s)
}
value = tmpValue
} else {
value = *(*uint16)(unsafe.Pointer(cvalue))
}
case TILEDB_UINT32:
if valueNum > 1 {
tmpValue := make([]uint32, valueNum)
tmpslice := (*[1 << 46]C.uint32_t)(unsafe.Pointer(cvalue))[:valueNum:valueNum]
for i, s := range tmpslice {
tmpValue[i] = uint32(s)
}
value = tmpValue
} else {
value = *(*uint32)(unsafe.Pointer(cvalue))
}
case TILEDB_UINT64:
if valueNum > 1 {
tmpValue := make([]uint64, valueNum)
tmpslice := (*[1 << 46]C.uint64_t)(unsafe.Pointer(cvalue))[:valueNum:valueNum]
for i, s := range tmpslice {
tmpValue[i] = uint64(s)
}
value = tmpValue
} else {
value = *(*uint64)(unsafe.Pointer(cvalue))
}
case TILEDB_FLOAT32:
if valueNum > 1 {
tmpValue := make([]float32, valueNum)
tmpslice := (*[1 << 46]C.float)(unsafe.Pointer(cvalue))[:valueNum:valueNum]
for i, s := range tmpslice {
tmpValue[i] = float32(s)
}
value = tmpValue
} else {
value = *(*float32)(unsafe.Pointer(cvalue))
}
case TILEDB_FLOAT64:
if valueNum > 1 {
tmpValue := make([]float64, valueNum)
tmpslice := (*[1 << 46]C.double)(unsafe.Pointer(cvalue))[:valueNum:valueNum]
for i, s := range tmpslice {
tmpValue[i] = float64(s)
}
value = tmpValue
} else {
value = *(*float64)(unsafe.Pointer(cvalue))
}
case TILEDB_CHAR:
tmpslice := (*[1 << 46]C.char)(unsafe.Pointer(cvalue))[:valueNum:valueNum]
value = C.GoString(&tmpslice[0])[0:valueNum]
case TILEDB_STRING_ASCII:
tmpslice := (*[1 << 46]C.char)(unsafe.Pointer(cvalue))[:valueNum:valueNum]
value = C.GoString(&tmpslice[0])[0:valueNum]
case TILEDB_STRING_UTF8:
tmpslice := (*[1 << 46]C.char)(unsafe.Pointer(cvalue))[:valueNum:valueNum]
value = C.GoString(&tmpslice[0])[0:valueNum]
case TILEDB_DATETIME_YEAR, TILEDB_DATETIME_MONTH, TILEDB_DATETIME_WEEK,
TILEDB_DATETIME_DAY, TILEDB_DATETIME_HR, TILEDB_DATETIME_MIN,
TILEDB_DATETIME_SEC, TILEDB_DATETIME_MS, TILEDB_DATETIME_US,
TILEDB_DATETIME_NS, TILEDB_DATETIME_PS, TILEDB_DATETIME_FS,
TILEDB_DATETIME_AS:
if valueNum > 1 {
return nil, fmt.Errorf("Unrecognized value type: %d", d)
} else {
var timestamp interface{} = *(*int16)(unsafe.Pointer(cvalue))
value = GetTimeFromTimestamp(d, timestamp.(int64))
}
default:
return nil, fmt.Errorf("Unrecognized value type: %d", d)
}
return value, nil
}
// EncryptionType represents different encryption algorithms
type EncryptionType uint8
const (
// TILEDB_NO_ENCRYPTION No encryption
TILEDB_NO_ENCRYPTION EncryptionType = C.TILEDB_NO_ENCRYPTION
// TILEDB_AES_256_GCM AES-256-GCM encryption
TILEDB_AES_256_GCM EncryptionType = C.TILEDB_AES_256_GCM
)
// FilterType for attribute/coordinates/offsets filters
type FilterType uint8
const (
// TILEDB_FILTER_NONE No-op filter
TILEDB_FILTER_NONE FilterType = C.TILEDB_FILTER_NONE
// TILEDB_FILTER_GZIP Gzip compressor
TILEDB_FILTER_GZIP FilterType = C.TILEDB_FILTER_GZIP
// TILEDB_FILTER_ZSTD Zstandard compressor
TILEDB_FILTER_ZSTD FilterType = C.TILEDB_FILTER_ZSTD
// TILEDB_FILTER_LZ4 LZ4 compressor
TILEDB_FILTER_LZ4 FilterType = C.TILEDB_FILTER_LZ4
// TILEDB_FILTER_RLE Run-length encoding compressor
TILEDB_FILTER_RLE FilterType = C.TILEDB_FILTER_RLE
// TILEDB_FILTER_BZIP2 Bzip2 compressor
TILEDB_FILTER_BZIP2 FilterType = C.TILEDB_FILTER_BZIP2
// TILEDB_FILTER_DOUBLE_DELTA Double-delta compressor
TILEDB_FILTER_DOUBLE_DELTA FilterType = C.TILEDB_FILTER_DOUBLE_DELTA
// TILEDB_FILTER_BIT_WIDTH_REDUCTION Bit width reduction filter.
TILEDB_FILTER_BIT_WIDTH_REDUCTION FilterType = C.TILEDB_FILTER_BIT_WIDTH_REDUCTION
// TILEDB_FILTER_BITSHUFFLE Bitshuffle filter.
TILEDB_FILTER_BITSHUFFLE FilterType = C.TILEDB_FILTER_BITSHUFFLE
// TILEDB_FILTER_BYTESHUFFLE Byteshuffle filter.
TILEDB_FILTER_BYTESHUFFLE FilterType = C.TILEDB_FILTER_BYTESHUFFLE
// TILEDB_FILTER_POSITIVE_DELTA Positive-delta encoding filter.
TILEDB_FILTER_POSITIVE_DELTA FilterType = C.TILEDB_FILTER_POSITIVE_DELTA
)
// FilterOption for a given filter
type FilterOption uint8
const (
// TILEDB_COMPRESSION_LEVEL Compression level. Type: `int32_t`.
TILEDB_COMPRESSION_LEVEL FilterOption = C.TILEDB_COMPRESSION_LEVEL
// TILEDB_BIT_WIDTH_MAX_WINDOW Max window length for bit width reduction. Type: `uint32_t`.
TILEDB_BIT_WIDTH_MAX_WINDOW FilterOption = C.TILEDB_BIT_WIDTH_MAX_WINDOW
// TILEDB_POSITIVE_DELTA_MAX_WINDOW Max window length for positive-delta encoding. Type: `uint32_t`.
TILEDB_POSITIVE_DELTA_MAX_WINDOW FilterOption = C.TILEDB_POSITIVE_DELTA_MAX_WINDOW
)
// FS represents support fs types
type FS int8
const (
// TILEDB_HDFS HDFS filesystem support
TILEDB_HDFS FS = C.TILEDB_HDFS
// TILEDB_S3 S3 filesystem support
TILEDB_S3 FS = C.TILEDB_S3
)
// Layout cell/tile layout
type Layout int8
const (
// TILEDB_ROW_MAJOR Row-major layout
TILEDB_ROW_MAJOR Layout = C.TILEDB_ROW_MAJOR
// TILEDB_COL_MAJOR Column-major layout
TILEDB_COL_MAJOR Layout = C.TILEDB_COL_MAJOR
// TILEDB_GLOBAL_ORDER Global-order layout
TILEDB_GLOBAL_ORDER Layout = C.TILEDB_GLOBAL_ORDER
// TILEDB_UNORDERED Unordered layout
TILEDB_UNORDERED Layout = C.TILEDB_UNORDERED
// TILEDB_HILBERT Hilbert layout
TILEDB_HILBERT Layout = C.TILEDB_HILBERT
)
// QueryStatus status of a query
type QueryStatus int8
const (
// TILEDB_FAILED Query failed
TILEDB_FAILED QueryStatus = C.TILEDB_FAILED
// TILEDB_COMPLETED Query completed (all data has been read)
TILEDB_COMPLETED QueryStatus = C.TILEDB_COMPLETED
// TILEDB_INPROGRESS Query is in progress
TILEDB_INPROGRESS QueryStatus = C.TILEDB_INPROGRESS
//TILEDB_INCOMPLETE Query completed (but not all data has been read)
TILEDB_INCOMPLETE QueryStatus = C.TILEDB_INCOMPLETE
// TILEDB_UNINITIALIZED Query not initialized.
TILEDB_UNINITIALIZED QueryStatus = C.TILEDB_UNINITIALIZED
)
// QueryType read or write query
type QueryType int8
const (
// TILEDB_READ Read query
TILEDB_READ QueryType = C.TILEDB_READ
// TILEDB_WRITE Write query
TILEDB_WRITE QueryType = C.TILEDB_WRITE
)
// SerializationType how data is serialized
type SerializationType int8
const (
// TILEDB_JSON Serialization to/from json
TILEDB_JSON SerializationType = C.TILEDB_JSON
// TILEDB_JSON Serialization to/from capnp
TILEDB_CAPNP SerializationType = C.TILEDB_CAPNP
)
// VFSMode is virtual file system file open mode
type VFSMode int8
const (
// TILEDB_VFS_READ open file in read mode
TILEDB_VFS_READ VFSMode = C.TILEDB_VFS_READ
// TILEDB_VFS_WRITE open file in write mode
TILEDB_VFS_WRITE VFSMode = C.TILEDB_VFS_WRITE
// TILEDB_VFS_APPENDopen file in write append mode
TILEDB_VFS_APPEND VFSMode = C.TILEDB_VFS_APPEND
)
// ObjectTypeEnum
type ObjectTypeEnum int8
const (
// Invalid object
TILEDB_INVALID ObjectTypeEnum = C.TILEDB_INVALID
// Group object
TILEDB_GROUP ObjectTypeEnum = C.TILEDB_GROUP
// Array object
TILEDB_ARRAY ObjectTypeEnum = C.TILEDB_ARRAY
)
// WalkOrder
type WalkOrder int8
const (
// Pre-order traversal
TILEDB_PREORDER WalkOrder = C.TILEDB_PREORDER
// Post-order traversal
TILEDB_POSTORDER WalkOrder = C.TILEDB_POSTORDER
)
// TILEDB_VAR_NUM indicates variable sized attributes for cell values
var TILEDB_VAR_NUM = uint(C.TILEDB_VAR_NUM)
// TILEDB_COORDS A special name indicating the coordinates attribute.
const TILEDB_COORDS = "__coords"