Skip to content

Commit eee5241

Browse files
authored
Merge pull request #275 from TileDB-Inc/sa/prepare-0.23.1
Sa/prepare 0.23.1
2 parents 2640d6a + 155faec commit eee5241

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,9 @@ The query methods `(Set)?Buffer(Var|Nullable|Var|Unsafe)*` are deprecated becaus
9696
TileDB core methods are removed. The methods will be supported for 2 releases and are expected to be
9797
removed in release 0.23. It is recommended to use the proper combination of
9898
`(Set|Get)DataBuffer`, `(Set|Get)ValidityBuffer` and `(Set|Get)OffsetBuffer`.
99+
100+
### 0.23.1
101+
102+
The query methods `(Add|Get)?Range` are deprecated because they are deprecated in TileDB core.
103+
It is recommend to use the `Subarray` type for building queries.
104+
The methods will be removed in the release following their removal from TileDB core.

query.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ func (q *Query) Context() *Context {
101101
// SetSubArray Sets a subarray, defined in the order dimensions were added.
102102
// Coordinates are inclusive. For the case of writes, this is meaningful only
103103
// for dense arrays, and specifically dense writes.
104+
//
105+
// Deprecated: Use Subarrays
104106
func (q *Query) SetSubArray(subArray interface{}) error {
105107

106108
if reflect.TypeOf(subArray).Kind() != reflect.Slice {
@@ -812,6 +814,8 @@ func getStartAndEndBuffers(start interface{}, end interface{}) (
812814
// (start, end, stride). The datatype of the range components must be the same
813815
// as the type of the domain of the array in the query.
814816
// The stride is currently unsupported and set to nil.
817+
//
818+
// Deprecated: Use Subarrays
815819
func (q *Query) AddRange(dimIdx uint32, start interface{}, end interface{}) error {
816820
startBuffer, endBuffer, err := getStartAndEndBuffers(start, end)
817821
if err != nil {
@@ -834,6 +838,8 @@ func (q *Query) AddRange(dimIdx uint32, start interface{}, end interface{}) erro
834838
// (start, end, stride). The datatype of the range components must be the same
835839
// as the type of the domain of the array in the query.
836840
// The stride is currently unsupported and set to nil.
841+
//
842+
// Deprecated: Use Subarrays
837843
func (q *Query) AddRangeByName(dimName string, start interface{}, end interface{}) error {
838844
startBuffer, endBuffer, err := getStartAndEndBuffers(start, end)
839845
if err != nil {
@@ -856,6 +862,8 @@ func (q *Query) AddRangeByName(dimName string, start interface{}, end interface{
856862

857863
// AddRangeVar adds a range applicable to variable-sized dimensions
858864
// Applicable only to string dimensions
865+
//
866+
// Deprecated: Use Subarrays
859867
func (q *Query) AddRangeVar(dimIdx uint32, start interface{}, end interface{}) error {
860868
startReflectValue := reflect.ValueOf(start)
861869
endReflectValue := reflect.ValueOf(end)
@@ -940,6 +948,8 @@ func (q *Query) AddRangeVar(dimIdx uint32, start interface{}, end interface{}) e
940948

941949
// AddRangeVarByName adds a range applicable to variable-sized dimensions
942950
// Applicable only to string dimensions
951+
//
952+
// Deprecated: Use Subarrays
943953
func (q *Query) AddRangeVarByName(dimName string, start interface{}, end interface{}) error {
944954
startReflectValue := reflect.ValueOf(start)
945955
endReflectValue := reflect.ValueOf(end)
@@ -1030,6 +1040,8 @@ func (q *Query) AddRangeVarByName(dimName string, start interface{}, end interfa
10301040
// Returns (start, end, error)
10311041
// If start size or end size is 0 returns nil, nil, nil
10321042
// Stride is not supported at the moment, always nil
1043+
//
1044+
// Deprecated: Use Subarrays
10331045
func (q *Query) GetRange(dimIdx uint32, rangeNum uint64) (interface{}, interface{}, error) {
10341046
var pStart, pEnd, pStride unsafe.Pointer
10351047

@@ -1159,6 +1171,8 @@ func (q *Query) GetRange(dimIdx uint32, rangeNum uint64) (interface{}, interface
11591171
// Returns (start, end, error)
11601172
// If start size or end size is 0 returns nil, nil, nil
11611173
// Stride is not supported at the moment, always nil
1174+
//
1175+
// Deprecated: Use Subarrays
11621176
func (q *Query) GetRangeFromName(dimName string, rangeNum uint64) (interface{}, interface{}, error) {
11631177
var pStart, pEnd, pStride unsafe.Pointer
11641178

@@ -1294,6 +1308,8 @@ func (q *Query) GetRangeFromName(dimName string, rangeNum uint64) (interface{},
12941308
// The function retrieves a specific range of the query subarray
12951309
// along a given dimension.
12961310
// Returns (start, end, error)
1311+
//
1312+
// Deprecated: Use Subarrays
12971313
func (q *Query) GetRangeVar(dimIdx uint32, rangeNum uint64) (interface{}, interface{}, error) {
12981314
return q.GetRange(dimIdx, rangeNum)
12991315
}
@@ -1303,12 +1319,16 @@ func (q *Query) GetRangeVar(dimIdx uint32, rangeNum uint64) (interface{}, interf
13031319
// The function retrieves a specific range of the query subarray
13041320
// along a given dimension.
13051321
// Returns (start, end, error)
1322+
//
1323+
// Deprecated: Use Subarrays
13061324
func (q *Query) GetRangeVarFromName(dimName string, rangeNum uint64) (interface{}, interface{}, error) {
13071325
return q.GetRangeFromName(dimName, rangeNum)
13081326
}
13091327

13101328
// GetRanges gets the number of dimensions from the array under current query
13111329
// and builds an array of dimensions that have as memmbers arrays of ranges
1330+
//
1331+
// Deprecated: Use Subarrays
13121332
func (q *Query) GetRanges() (map[string][]RangeLimits, error) {
13131333
// We need to infer the datatype of the dimension represented by index
13141334
// dimIdx. That said:
@@ -1372,6 +1392,8 @@ func (q *Query) GetRanges() (map[string][]RangeLimits, error) {
13721392

13731393
// GetRangeNum retrieves the number of ranges of the query subarray
13741394
// along a given dimension.
1395+
//
1396+
// Deprecated: Use Subarrays
13751397
func (q *Query) GetRangeNum(dimIdx uint32) (*uint64, error) {
13761398
var rangeNum uint64
13771399

@@ -1389,6 +1411,8 @@ func (q *Query) GetRangeNum(dimIdx uint32) (*uint64, error) {
13891411

13901412
// GetRangeNumFromName retrieves the number of ranges of the query subarray
13911413
// along a given dimension.
1414+
//
1415+
// Deprecated: Use Subarrays
13921416
func (q *Query) GetRangeNumFromName(dimName string) (*uint64, error) {
13931417
var rangeNum uint64
13941418

0 commit comments

Comments
 (0)