aerospike 4.0.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -5
- package/examples/sindex.js +3 -3
- package/lib/aerospike.js +11 -11
- package/lib/binding/node-v102-darwin-x64/aerospike.node +0 -0
- package/lib/binding/node-v102-linux-x64/aerospike.node +0 -0
- package/lib/binding/node-v102-win32-x64/aerospike.node +0 -0
- package/lib/binding/node-v108-darwin-x64/aerospike.node +0 -0
- package/lib/binding/node-v108-linux-x64/aerospike.node +0 -0
- package/lib/binding/node-v108-win32-x64/aerospike.node +0 -0
- package/lib/binding/node-v64-darwin-x64/aerospike.node +0 -0
- package/lib/binding/node-v64-linux-x64/aerospike.node +0 -0
- package/lib/binding/node-v64-win32-x64/aerospike.node +0 -0
- package/lib/binding/node-v72-darwin-x64/aerospike.node +0 -0
- package/lib/binding/node-v72-linux-x64/aerospike.node +0 -0
- package/lib/binding/node-v72-win32-x64/aerospike.node +0 -0
- package/lib/binding/node-v83-darwin-x64/aerospike.node +0 -0
- package/lib/binding/node-v83-linux-x64/aerospike.node +0 -0
- package/lib/binding/node-v83-win32-x64/aerospike.node +0 -0
- package/lib/binding/node-v93-darwin-x64/aerospike.node +0 -0
- package/lib/binding/node-v93-linux-x64/aerospike.node +0 -0
- package/lib/binding/node-v93-win32-x64/aerospike.node +0 -0
- package/lib/client.js +9 -9
- package/lib/exp.js +5 -5
- package/lib/filter.js +11 -11
- package/lib/index_job.js +3 -3
- package/lib/policies/query_policy.js +25 -0
- package/lib/policies/scan_policy.js +2 -2
- package/lib/predexp.js +37 -37
- package/lib/query.js +16 -16
- package/lib/scan.js +1 -1
- package/lib/status.js +4 -4
- package/package.json +1 -1
- package/scripts/build-c-client.sh-cclient-output.log +121 -121
- package/scripts/build-package.ps1 +2 -0
- package/scripts/build-package.sh +2 -0
- package/scripts/build-package.sh-cclient-output.log +151 -151
- package/scripts/build-package.sh-libuv-output.log +86 -86
- package/src/main/policy.cc +6 -0
- package/test/command_queue.js +47 -0
- package/test/policy.js +5 -1
- package/test/scan.js +9 -1
- package/test/stress/query.js +3 -3
- package/lib/.DS_Store +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -11,7 +11,7 @@ All notable changes to this project will be documented in this file.
|
|
|
11
11
|
## [4.0.0]
|
|
12
12
|
|
|
13
13
|
* **New Features**
|
|
14
|
-
* [CLIENT-1678] - Support boolean particle type. This feature requires
|
|
14
|
+
* [CLIENT-1678] - Support boolean particle type. This feature requires server 5.6+. [#428](https://github.com/aerospike/aerospike-client-nodejs/pull/428)
|
|
15
15
|
* [CLIENT-1679] - Add support for Aerospike Expressions.
|
|
16
16
|
* [CLIENT-1680] - Added TypeScript typings. [#446](https://github.com/aerospike/aerospike-client-nodejs/pull/446) Thanks to [@bit0r1n](https://github.com/bit0r1n)!
|
|
17
17
|
|
|
@@ -82,7 +82,7 @@ All notable changes to this project will be documented in this file.
|
|
|
82
82
|
## [3.16.1] - 2020-06-30
|
|
83
83
|
|
|
84
84
|
* **Bug Fixes**
|
|
85
|
-
* Fix memory leaks when running secondary index queries with string filter predicates. [#370](https://github.com/aerospike/aerospike-client-nodejs/issues/370)
|
|
85
|
+
* Fix memory leaks when running secondary index (SI) queries with string filter predicates. [#370](https://github.com/aerospike/aerospike-client-nodejs/issues/370)
|
|
86
86
|
|
|
87
87
|
## [3.16.0] - 2020-05-18
|
|
88
88
|
|
|
@@ -337,7 +337,7 @@ All notable changes to this project will be documented in this file.
|
|
|
337
337
|
* **New Features**
|
|
338
338
|
* Support for Promises in addition to Callback functions [PR #210](https://github.com/aerospike/aerospike-client-nodejs/pull/210)
|
|
339
339
|
* Support nobins flag on query operations
|
|
340
|
-
* Support CDT List Increment operation. Requires
|
|
340
|
+
* Support CDT List Increment operation. Requires server 3.15 or later.
|
|
341
341
|
* Improved timeout handling and automatic transaction retries - see [detailed API changes](https://www.aerospike.com/docs/client/nodejs/usage/incompatible.html#version-3-0-0) for more info.
|
|
342
342
|
* Support gen policy for apply UDF operation.
|
|
343
343
|
|
|
@@ -519,7 +519,7 @@ v2.5.x is the last release to support Node.js v0.12 and io.js. The next major cl
|
|
|
519
519
|
## [2.1.0] - 2016-06-03
|
|
520
520
|
|
|
521
521
|
* **New Features**
|
|
522
|
-
* Support for operations on Sorted Maps. Requires
|
|
522
|
+
* Support for operations on Sorted Maps. Requires server 3.8.4 or later.
|
|
523
523
|
|
|
524
524
|
* **Improvements**
|
|
525
525
|
* Key objects returned in callbacks now include the digest
|
|
@@ -614,7 +614,7 @@ v2.5.x is the last release to support Node.js v0.12 and io.js. The next major cl
|
|
|
614
614
|
|
|
615
615
|
* **Improvements**
|
|
616
616
|
* Added support for creating secondary indexes on list and map values;
|
|
617
|
-
requires
|
|
617
|
+
requires server >= 3.8. [CLIENT-684]
|
|
618
618
|
* Added `Aerospike.info` module with `parseInfo` utility method to parse info
|
|
619
619
|
string returned by Aerospike cluster nodes using `Client#info` method.
|
|
620
620
|
* Added IndexTask class returned by `Client#createIndex` to replace
|
package/examples/sindex.js
CHANGED
|
@@ -55,12 +55,12 @@ async function sindexRemove (client, argv) {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
exports.command = 'sindex <command>'
|
|
58
|
-
exports.describe = 'Manage secondary indexes'
|
|
58
|
+
exports.describe = 'Manage secondary indexes (SI)'
|
|
59
59
|
exports.builder = yargs => {
|
|
60
60
|
return yargs
|
|
61
61
|
.command({
|
|
62
62
|
command: 'create <bin> <index> <type>',
|
|
63
|
-
desc: 'Create a
|
|
63
|
+
desc: 'Create a SI',
|
|
64
64
|
handler: shared.run(sindexCreate),
|
|
65
65
|
builder: {
|
|
66
66
|
type: {
|
|
@@ -71,7 +71,7 @@ exports.builder = yargs => {
|
|
|
71
71
|
})
|
|
72
72
|
.command({
|
|
73
73
|
command: 'remove <index>',
|
|
74
|
-
desc: 'Remove a
|
|
74
|
+
desc: 'Remove a SI',
|
|
75
75
|
handler: shared.run(sindexRemove)
|
|
76
76
|
})
|
|
77
77
|
}
|
package/lib/aerospike.js
CHANGED
|
@@ -35,7 +35,7 @@ const utils = require('./utils')
|
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* The {@link module:aerospike/filter|filter} module provides functions to
|
|
38
|
-
* create secondary index filter predicates for use in query operations via the
|
|
38
|
+
* create secondary index (SI) filter predicates for use in query operations via the
|
|
39
39
|
* {@link Client#query} command.
|
|
40
40
|
*
|
|
41
41
|
* @summary {@link module:aerospike/filter|aerospike/filter} module
|
|
@@ -371,7 +371,7 @@ exports.log = as.log
|
|
|
371
371
|
* namespace of the record.
|
|
372
372
|
* @property {number} NEVER_EXIRE - Never expire the record.
|
|
373
373
|
* @property {number} DONT_UPDATE - Update the record without changing the
|
|
374
|
-
* record's TTL value. Requires
|
|
374
|
+
* record's TTL value. Requires server 3.10.1 or later.
|
|
375
375
|
*
|
|
376
376
|
* @example <caption>Use ttl.DONT_UPDATE to change the value of a record
|
|
377
377
|
* bin without changing the records expiry time</caption>
|
|
@@ -422,34 +422,34 @@ exports.ttl = as.ttl
|
|
|
422
422
|
exports.jobStatus = as.jobStatus
|
|
423
423
|
|
|
424
424
|
/**
|
|
425
|
-
* @summary Enumeration of
|
|
425
|
+
* @summary Enumeration of SI data types.
|
|
426
426
|
*
|
|
427
427
|
* @readonly
|
|
428
428
|
* @enum {number}
|
|
429
429
|
*
|
|
430
|
-
* @property {number} STRING - Values contained in the
|
|
431
|
-
* @property {number} NUMERIC - Values contained in the
|
|
432
|
-
* @property {number} GEO2DSPHERE - Values contained in the
|
|
430
|
+
* @property {number} STRING - Values contained in the SI are strings.
|
|
431
|
+
* @property {number} NUMERIC - Values contained in the SI are integers.
|
|
432
|
+
* @property {number} GEO2DSPHERE - Values contained in the SI are GeoJSON values (points or polygons).
|
|
433
433
|
*
|
|
434
434
|
* @see {@link Client#createIndex}
|
|
435
435
|
*/
|
|
436
436
|
exports.indexDataType = as.indexDataType
|
|
437
437
|
|
|
438
438
|
/**
|
|
439
|
-
* @summary Enumeration of
|
|
439
|
+
* @summary Enumeration of SI types.
|
|
440
440
|
*
|
|
441
441
|
* @readonly
|
|
442
442
|
* @enum {number}
|
|
443
443
|
*
|
|
444
|
-
* @property {number} DEFAULT - Default
|
|
444
|
+
* @property {number} DEFAULT - Default SI type for bins
|
|
445
445
|
* containing scalar values (i.e. integer, string).
|
|
446
|
-
* @property {number} LIST -
|
|
446
|
+
* @property {number} LIST - SI for bins containing
|
|
447
447
|
* <a href="http://www.aerospike.com/docs/guide/cdt-list.html" title="Aerospike List Data Type">⇑Lists</a>;
|
|
448
448
|
* the index will be build over the individual entries of the list.
|
|
449
|
-
* @property {number} MAPKEYS -
|
|
449
|
+
* @property {number} MAPKEYS - SI for bins containing
|
|
450
450
|
* <a href="http://www.aerospike.com/docs/guide/cdt-map.html" title="Aerospike Maps Data Type">⇑Maps</a>;
|
|
451
451
|
* the index will be build over the individual keys of the map entries.
|
|
452
|
-
* @property {number} MAPVALUES -
|
|
452
|
+
* @property {number} MAPVALUES - SI for bins containing
|
|
453
453
|
* <a href="http://www.aerospike.com/docs/guide/cdt-map.html" title="Aerospike Maps Data Type">⇑Maps</a>;
|
|
454
454
|
* the index will be build over the individual values of the map entries.
|
|
455
455
|
*
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/client.js
CHANGED
|
@@ -344,7 +344,7 @@ Client.prototype.batchGet = function (keys, policy, callback) {
|
|
|
344
344
|
* @description
|
|
345
345
|
*
|
|
346
346
|
* This method allows different namespaces/bins to be requested for each key in
|
|
347
|
-
* the batch. This method requires
|
|
347
|
+
* the batch. This method requires server >= 3.6.0.
|
|
348
348
|
*
|
|
349
349
|
* @param {object[]} records - List of keys and bins to retrieve.
|
|
350
350
|
* @param {Key} records[].key - Key to retrieve.
|
|
@@ -546,7 +546,7 @@ Client.prototype.connect = function (callback) {
|
|
|
546
546
|
/**
|
|
547
547
|
* @function Client#createIndex
|
|
548
548
|
*
|
|
549
|
-
* @summary Creates a secondary index.
|
|
549
|
+
* @summary Creates a secondary index (SI).
|
|
550
550
|
*
|
|
551
551
|
* @description
|
|
552
552
|
*
|
|
@@ -634,7 +634,7 @@ Client.prototype.connect = function (callback) {
|
|
|
634
634
|
* var pollInterval = 100
|
|
635
635
|
* job.waitUntilDone(pollInterval, (error) => {
|
|
636
636
|
* if (error) throw error
|
|
637
|
-
* console.info('
|
|
637
|
+
* console.info('SI %s on %s was created successfully', indexName, binName)
|
|
638
638
|
* client.close()
|
|
639
639
|
* })
|
|
640
640
|
* })
|
|
@@ -664,7 +664,7 @@ Client.prototype.createIndex = function (options, policy, callback) {
|
|
|
664
664
|
/**
|
|
665
665
|
* @function Client#createIntegerIndex
|
|
666
666
|
*
|
|
667
|
-
* @summary Creates a
|
|
667
|
+
* @summary Creates a SI of type Integer.
|
|
668
668
|
*
|
|
669
669
|
* @description This is a short-hand for calling {@link Client#createIndex}
|
|
670
670
|
* with the <code>datatype</code> option set to <code>Aerospike.indexDataType.NUMERIC</code>.
|
|
@@ -701,7 +701,7 @@ Client.prototype.createIndex = function (options, policy, callback) {
|
|
|
701
701
|
*
|
|
702
702
|
* client.createIntegerIndex(options, function (error) {
|
|
703
703
|
* if (error) throw error
|
|
704
|
-
* console.info('
|
|
704
|
+
* console.info('SI %s on %s was created successfully', indexName, binName)
|
|
705
705
|
* client.close()
|
|
706
706
|
* })
|
|
707
707
|
* })
|
|
@@ -714,7 +714,7 @@ Client.prototype.createIntegerIndex = function (options, policy, callback) {
|
|
|
714
714
|
/**
|
|
715
715
|
* @function Client#createStringIndex
|
|
716
716
|
*
|
|
717
|
-
* @summary Creates a
|
|
717
|
+
* @summary Creates a SI of type String.
|
|
718
718
|
*
|
|
719
719
|
* @description This is a short-hand for calling {@link Client#createIndex}
|
|
720
720
|
* with the <code>datatype</code> option set to <code>Aerospike.indexDataType.STRING</code>.
|
|
@@ -751,7 +751,7 @@ Client.prototype.createIntegerIndex = function (options, policy, callback) {
|
|
|
751
751
|
*
|
|
752
752
|
* client.createStringIndex(options, function (error) {
|
|
753
753
|
* if (error) throw error
|
|
754
|
-
* console.info('
|
|
754
|
+
* console.info('SI %s on %s was created successfully', indexName, binName)
|
|
755
755
|
* client.close()
|
|
756
756
|
* })
|
|
757
757
|
* })
|
|
@@ -801,7 +801,7 @@ Client.prototype.createStringIndex = function (options, policy, callback) {
|
|
|
801
801
|
*
|
|
802
802
|
* client.createGeo2DSphereIndex(options, function (error) {
|
|
803
803
|
* if (error) throw error
|
|
804
|
-
* console.info('
|
|
804
|
+
* console.info('SI %s on %s was created successfully', indexName, binName)
|
|
805
805
|
* client.close()
|
|
806
806
|
* })
|
|
807
807
|
* })
|
|
@@ -1503,7 +1503,7 @@ Client.prototype.select = function (key, bins, policy, callback) {
|
|
|
1503
1503
|
* @summary Removes records in specified namespace/set efficiently.
|
|
1504
1504
|
*
|
|
1505
1505
|
* @description This method is many orders of magnitude faster than deleting
|
|
1506
|
-
* records one at a time. It requires
|
|
1506
|
+
* records one at a time. It requires server 3.12 or later.
|
|
1507
1507
|
*
|
|
1508
1508
|
* @param {string} ns - Required namespace.
|
|
1509
1509
|
* @param {string} set - Optional set name. Set to <code>null</code> to delete
|
package/lib/exp.js
CHANGED
|
@@ -30,17 +30,17 @@ const BIN_TYPE_UNDEF = 0
|
|
|
30
30
|
* @module aerospike/exp
|
|
31
31
|
* @summary {@link module:aerospike/exp|aerospike/exp} module
|
|
32
32
|
*
|
|
33
|
-
* @description This module defines a filter expression that
|
|
33
|
+
* @description This module defines a filter expression that is
|
|
34
34
|
* a mechanism for additional filtering.
|
|
35
|
-
* The resultset of a secondary index query or primary index
|
|
35
|
+
* The resultset of a secondary index (SI) query or primary index (PI)
|
|
36
36
|
* query (scan) operation can be filtered through the QueryPolicy
|
|
37
37
|
* and ScanPolicy classes.
|
|
38
|
-
* It can also
|
|
38
|
+
* It can also filter single key operations and
|
|
39
39
|
* batch operations through the filterExpression field of their policy class.
|
|
40
40
|
*
|
|
41
41
|
* Filter Expressions replace PredicateExpression filtering,
|
|
42
|
-
* which was deprecated in
|
|
43
|
-
* removed in
|
|
42
|
+
* which was deprecated in server 5.2 and
|
|
43
|
+
* removed in server 6.0.
|
|
44
44
|
*
|
|
45
45
|
* @see {@link ReadPolicy#filterExpression}
|
|
46
46
|
* @see {@link OperatePolicy#filterExpression}
|
package/lib/filter.js
CHANGED
|
@@ -22,7 +22,7 @@ const GeoJSON = require('./geojson')
|
|
|
22
22
|
/**
|
|
23
23
|
* @module aerospike/filter
|
|
24
24
|
*
|
|
25
|
-
* @description This module provides functions to create secondary index filter
|
|
25
|
+
* @description This module provides functions to create secondary index (SI) filter
|
|
26
26
|
* predicates for use in query operations via the {@link Client#query} command.
|
|
27
27
|
*
|
|
28
28
|
* @see {@link Query}
|
|
@@ -47,7 +47,7 @@ const GeoJSON = require('./geojson')
|
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* @class module:aerospike/filter~SindexFilterPredicate
|
|
50
|
-
* @classdesc
|
|
50
|
+
* @classdesc SI filter predicate to limit the scope of a {@link Query}.
|
|
51
51
|
*
|
|
52
52
|
* Filter predicates must be instantiated using the methods in the {@link
|
|
53
53
|
* module:aerospike/filter} module.
|
|
@@ -124,7 +124,7 @@ function dataTypeOf (value) {
|
|
|
124
124
|
* @param {number} max - Upper end of the range (inclusive).
|
|
125
125
|
* @param {number} [indexType=Aerospike.indexType.DEFAULT] - One of {@link
|
|
126
126
|
* module:aerospike.indexType}, i.e. LIST or MAPVALUES.
|
|
127
|
-
* @returns {module:aerospike/filter~SindexFilterPredicate}
|
|
127
|
+
* @returns {module:aerospike/filter~SindexFilterPredicate} SI
|
|
128
128
|
* filter predicate, that can be applied to queries using {@link Query#where}.
|
|
129
129
|
*/
|
|
130
130
|
exports.range = function (bin, min, max, indexType) {
|
|
@@ -139,7 +139,7 @@ exports.range = function (bin, min, max, indexType) {
|
|
|
139
139
|
*
|
|
140
140
|
* @param {string} bin - The name of the bin.
|
|
141
141
|
* @param {string} value - The filter value.
|
|
142
|
-
* @returns {module:aerospike/filter~SindexFilterPredicate}
|
|
142
|
+
* @returns {module:aerospike/filter~SindexFilterPredicate} SI
|
|
143
143
|
* filter predicate, that can be applied to queries using {@link Query#where}.
|
|
144
144
|
*/
|
|
145
145
|
exports.equal = function (bin, value) {
|
|
@@ -157,7 +157,7 @@ exports.equal = function (bin, value) {
|
|
|
157
157
|
* list or map in the bin.
|
|
158
158
|
* @param {number} indexType - One of {@link module:aerospike.indexType},
|
|
159
159
|
* i.e. LIST, MAPVALUES or MAPKEYS.
|
|
160
|
-
* @returns {module:aerospike/filter~SindexFilterPredicate}
|
|
160
|
+
* @returns {module:aerospike/filter~SindexFilterPredicate} SI
|
|
161
161
|
* filter predicate, that can be applied to queries using {@link Query#where}.
|
|
162
162
|
*
|
|
163
163
|
* @since v2.0
|
|
@@ -178,7 +178,7 @@ exports.contains = function (bin, value, indexType) {
|
|
|
178
178
|
* @param {GeoJSON} value - GeoJSON region value.
|
|
179
179
|
* @param {number} [indexType=Aerospike.indexType.DEFAULT] - One of {@link
|
|
180
180
|
* module:aerospike.indexType}, i.e. LIST or MAPVALUES.
|
|
181
|
-
* @returns {module:aerospike/filter~SindexFilterPredicate}
|
|
181
|
+
* @returns {module:aerospike/filter~SindexFilterPredicate} SI
|
|
182
182
|
* filter predicate, that can be applied to queries using {@link Query#where}.
|
|
183
183
|
*
|
|
184
184
|
* @since v2.0
|
|
@@ -196,14 +196,14 @@ exports.geoWithinGeoJSONRegion = function (bin, value, indexType) {
|
|
|
196
196
|
* @summary Geospatial filter that matches regions that contain a given GeoJSON
|
|
197
197
|
* point.
|
|
198
198
|
* @description Depending on the index type, the filter will match GeoJSON
|
|
199
|
-
* regions within list or map values as well (requires
|
|
199
|
+
* regions within list or map values as well (requires server
|
|
200
200
|
* >= 3.8).
|
|
201
201
|
*
|
|
202
202
|
* @param {string} bin - The name of the bin.
|
|
203
203
|
* @param {GeoJSON} value - GeoJSON point value.
|
|
204
204
|
* @param {number} [indexType=Aerospike.indexType.DEFAULT] - One of {@link
|
|
205
205
|
* module:aerospike.indexType}, i.e. LIST or MAPVALUES.
|
|
206
|
-
* @returns {module:aerospike/filter~SindexFilterPredicate}
|
|
206
|
+
* @returns {module:aerospike/filter~SindexFilterPredicate} SI
|
|
207
207
|
* filter predicate, that can be applied to queries using {@link Query#where}.
|
|
208
208
|
*
|
|
209
209
|
* @since v2.0
|
|
@@ -230,7 +230,7 @@ exports.geoContainsGeoJSONPoint = function (bin, value, indexType) {
|
|
|
230
230
|
* @param {number} radius - Radius in meters.
|
|
231
231
|
* @param {number} [indexType=Aerospike.indexType.DEFAULT] - One of {@link
|
|
232
232
|
* module:aerospike.indexType}, i.e. LIST or MAPVALUES.
|
|
233
|
-
* @returns {module:aerospike/filter~SindexFilterPredicate}
|
|
233
|
+
* @returns {module:aerospike/filter~SindexFilterPredicate} SI
|
|
234
234
|
* filter predicate, that can be applied to queries using {@link Query#where}.
|
|
235
235
|
*
|
|
236
236
|
* @since v2.0
|
|
@@ -244,7 +244,7 @@ exports.geoWithinRadius = function (bin, lon, lat, radius, indexType) {
|
|
|
244
244
|
* @summary Geospatial filter that matches regions that contain a given lng/lat
|
|
245
245
|
* coordinate.
|
|
246
246
|
* @description Depending on the index type, the filter will match GeoJSON
|
|
247
|
-
* regions within list or map values as well (requires
|
|
247
|
+
* regions within list or map values as well (requires server
|
|
248
248
|
* >= 3.8).
|
|
249
249
|
*
|
|
250
250
|
* @param {string} bin - The name of the bin.
|
|
@@ -252,7 +252,7 @@ exports.geoWithinRadius = function (bin, lon, lat, radius, indexType) {
|
|
|
252
252
|
* @param {number} lat - Latitude of the point.
|
|
253
253
|
* @param {number} [indexType=Aerospike.indexType.DEFAULT] - One of {@link
|
|
254
254
|
* module:aerospike.indexType}, i.e. LIST or MAPVALUES.
|
|
255
|
-
* @returns {module:aerospike/filter~SindexFilterPredicate}
|
|
255
|
+
* @returns {module:aerospike/filter~SindexFilterPredicate} SI
|
|
256
256
|
* filter predicate, that can be applied to queries using {@link Query#where}.
|
|
257
257
|
*
|
|
258
258
|
* @since v2.0
|
package/lib/index_job.js
CHANGED
|
@@ -48,7 +48,7 @@ const util = require('util')
|
|
|
48
48
|
* client.createIndex(options)
|
|
49
49
|
* .then(job => job.wait())
|
|
50
50
|
* .then(() => {
|
|
51
|
-
* console.info('
|
|
51
|
+
* console.info('secondary index (SI) %s on %s was created successfully', indexName, binName)
|
|
52
52
|
* client.close()
|
|
53
53
|
* })
|
|
54
54
|
* .catch(error => {
|
|
@@ -77,7 +77,7 @@ IndexJob.prototype.hasCompleted = function (sindexInfo) {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
* Fetches info for the
|
|
80
|
+
* Fetches info for the SI from each cluster node.
|
|
81
81
|
*
|
|
82
82
|
* @private
|
|
83
83
|
*/
|
|
@@ -99,7 +99,7 @@ IndexJob.prototype.info = function () {
|
|
|
99
99
|
/**
|
|
100
100
|
* @function IndexJob#wait
|
|
101
101
|
*
|
|
102
|
-
* @summary Wait until the job of creating a
|
|
102
|
+
* @summary Wait until the job of creating a SI has completed.
|
|
103
103
|
*
|
|
104
104
|
* @param {number} [pollInterval=1000] - Interval in milliseconds to use when polling the cluster nodes.
|
|
105
105
|
* @param {doneCallback} [callback] - The function to call when the operation completes.
|
|
@@ -51,6 +51,31 @@ class QueryPolicy extends BasePolicy {
|
|
|
51
51
|
* @since v3.7.0
|
|
52
52
|
*/
|
|
53
53
|
this.deserialize = props.deserialize
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Terminate the query if the cluster is in migration state. If the query's
|
|
57
|
+
* "where" clause is not defined (scan), this field is ignored.
|
|
58
|
+
*
|
|
59
|
+
* Requires Aerospike Server version 4.2.0.2 or later.
|
|
60
|
+
*
|
|
61
|
+
* @type boolean
|
|
62
|
+
* @default <code>false</code>
|
|
63
|
+
* @since v3.4.0
|
|
64
|
+
*/
|
|
65
|
+
this.failOnClusterChange = props.failOnClusterChange
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Timeout in milliseconds used when the client sends info commands to
|
|
69
|
+
* check for cluster changes before and after the query. This timeout is
|
|
70
|
+
* only used when {@link
|
|
71
|
+
* QueryPolicy#failOnClusterChange|failOnClusterChange} is true and the
|
|
72
|
+
* query's "where" clause is defined.
|
|
73
|
+
*
|
|
74
|
+
* @type number
|
|
75
|
+
* @default 10000 ms
|
|
76
|
+
* @since v3.16.5
|
|
77
|
+
*/
|
|
78
|
+
this.infoTimeout = props.infoTimeout
|
|
54
79
|
}
|
|
55
80
|
}
|
|
56
81
|
|
|
@@ -57,7 +57,7 @@ class ScanPolicy extends BasePolicy {
|
|
|
57
57
|
* Limit returned records per second (RPS) rate for each server. Do not
|
|
58
58
|
* apply RPS limit if <code>recordsPerSecond</code> is zero.
|
|
59
59
|
*
|
|
60
|
-
* Requires
|
|
60
|
+
* Requires server >= 4.7.
|
|
61
61
|
*
|
|
62
62
|
* @type number
|
|
63
63
|
* @default 0
|
|
@@ -72,7 +72,7 @@ class ScanPolicy extends BasePolicy {
|
|
|
72
72
|
* of records returned may be less than maxRecords if node record counts
|
|
73
73
|
* are small and unbalanced across nodes.
|
|
74
74
|
*
|
|
75
|
-
* Requires
|
|
75
|
+
* Requires server >= 4.9.
|
|
76
76
|
*
|
|
77
77
|
* @type number
|
|
78
78
|
* @default 0 (do not limit record count)
|