aerospike 5.12.0 → 5.13.0

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.
Files changed (204) hide show
  1. package/README.md +39 -35
  2. package/benchmarks/alerts.js +1 -1
  3. package/benchmarks/inspect.js +1 -1
  4. package/benchmarks/logging.js +1 -1
  5. package/benchmarks/main.js +1 -1
  6. package/benchmarks/memory.js +1 -1
  7. package/benchmarks/stats.js +1 -1
  8. package/benchmarks/worker.js +1 -1
  9. package/examples/add.js +1 -1
  10. package/examples/append.js +1 -1
  11. package/examples/apply.js +1 -1
  12. package/examples/batch.js +1 -1
  13. package/examples/exists.js +1 -1
  14. package/examples/geospatialMonteCarlo.js +1 -1
  15. package/examples/get.js +1 -1
  16. package/examples/info.js +1 -1
  17. package/examples/operate.js +1 -1
  18. package/examples/put.js +1 -1
  19. package/examples/query.js +1 -1
  20. package/examples/remove.js +1 -1
  21. package/examples/run.js +1 -1
  22. package/examples/scan.js +1 -1
  23. package/examples/sindex.js +1 -1
  24. package/examples/udf.js +1 -1
  25. package/lib/aerospike.js +30 -2
  26. package/lib/batch_type.js +4 -4
  27. package/lib/bigint.js +1 -1
  28. package/lib/binding/{openssl@3/node-v120-linux-arm64 → glibc@2.31/node-v108-linux-arm64}/aerospike.node +0 -0
  29. package/lib/binding/{openssl@3/node-v120-linux-x64 → glibc@2.31/node-v108-linux-x64}/aerospike.node +0 -0
  30. package/lib/binding/glibc@2.31/node-v115-linux-arm64/aerospike.node +0 -0
  31. package/lib/binding/glibc@2.31/node-v115-linux-x64/aerospike.node +0 -0
  32. package/lib/binding/glibc@2.31/node-v127-linux-arm64/aerospike.node +0 -0
  33. package/lib/binding/glibc@2.31/node-v127-linux-x64/aerospike.node +0 -0
  34. package/lib/binding/{openssl@1/node-v108-linux-arm64 → glibc@2.31/node-v131-linux-arm64}/aerospike.node +0 -0
  35. package/lib/binding/{openssl@1/node-v108-linux-x64 → glibc@2.31/node-v131-linux-x64}/aerospike.node +0 -0
  36. package/lib/binding/{openssl@3/node-v115-linux-arm64 → glibc@2.35/node-v108-linux-arm64}/aerospike.node +0 -0
  37. package/lib/binding/{openssl@3/node-v115-linux-x64 → glibc@2.35/node-v108-linux-x64}/aerospike.node +0 -0
  38. package/lib/binding/glibc@2.35/node-v115-linux-arm64/aerospike.node +0 -0
  39. package/lib/binding/glibc@2.35/node-v115-linux-x64/aerospike.node +0 -0
  40. package/lib/binding/glibc@2.35/node-v127-linux-arm64/aerospike.node +0 -0
  41. package/lib/binding/glibc@2.35/node-v127-linux-x64/aerospike.node +0 -0
  42. package/lib/binding/{openssl@1/node-v115-linux-arm64 → glibc@2.35/node-v131-linux-arm64}/aerospike.node +0 -0
  43. package/lib/binding/{openssl@1/node-v115-linux-x64 → glibc@2.35/node-v131-linux-x64}/aerospike.node +0 -0
  44. package/lib/binding/node-v108-darwin-arm64/aerospike.node +0 -0
  45. package/lib/binding/node-v108-darwin-x64/aerospike.node +0 -0
  46. package/lib/binding/node-v108-win32-x64/aerospike.dll +0 -0
  47. package/lib/binding/node-v108-win32-x64/aerospike.node +0 -0
  48. package/lib/binding/node-v108-win32-x64/event_core.dll +0 -0
  49. package/lib/binding/node-v108-win32-x64/getopt.dll +0 -0
  50. package/lib/binding/node-v108-win32-x64/libeay32.dll +0 -0
  51. package/lib/binding/node-v108-win32-x64/pthreadVC2.dll +0 -0
  52. package/lib/binding/node-v108-win32-x64/ssleay32.dll +0 -0
  53. package/lib/binding/node-v108-win32-x64/zlib.dll +0 -0
  54. package/lib/binding/node-v115-darwin-arm64/aerospike.node +0 -0
  55. package/lib/binding/node-v115-darwin-x64/aerospike.node +0 -0
  56. package/lib/binding/node-v115-win32-x64/aerospike.dll +0 -0
  57. package/lib/binding/node-v115-win32-x64/aerospike.node +0 -0
  58. package/lib/binding/node-v115-win32-x64/event_core.dll +0 -0
  59. package/lib/binding/node-v115-win32-x64/getopt.dll +0 -0
  60. package/lib/binding/node-v115-win32-x64/libeay32.dll +0 -0
  61. package/lib/binding/node-v115-win32-x64/pthreadVC2.dll +0 -0
  62. package/lib/binding/node-v115-win32-x64/ssleay32.dll +0 -0
  63. package/lib/binding/node-v115-win32-x64/zlib.dll +0 -0
  64. package/lib/binding/node-v127-darwin-arm64/aerospike.node +0 -0
  65. package/lib/binding/node-v127-darwin-x64/aerospike.node +0 -0
  66. package/lib/binding/node-v127-win32-x64/aerospike.dll +0 -0
  67. package/lib/binding/node-v127-win32-x64/aerospike.node +0 -0
  68. package/lib/binding/{node-v120-win32-x64 → node-v127-win32-x64}/event_core.dll +0 -0
  69. package/lib/binding/{node-v120-win32-x64 → node-v127-win32-x64}/getopt.dll +0 -0
  70. package/lib/binding/{node-v120-win32-x64 → node-v127-win32-x64}/libeay32.dll +0 -0
  71. package/lib/binding/{node-v120-win32-x64 → node-v127-win32-x64}/pthreadVC2.dll +0 -0
  72. package/lib/binding/{node-v120-win32-x64 → node-v127-win32-x64}/ssleay32.dll +0 -0
  73. package/lib/binding/{node-v120-win32-x64 → node-v127-win32-x64}/zlib.dll +0 -0
  74. package/lib/binding/node-v131-darwin-arm64/aerospike.node +0 -0
  75. package/lib/binding/node-v131-darwin-x64/aerospike.node +0 -0
  76. package/lib/binding/node-v131-win32-x64/aerospike.dll +0 -0
  77. package/lib/binding/node-v131-win32-x64/aerospike.node +0 -0
  78. package/lib/binding/node-v131-win32-x64/event_core.dll +0 -0
  79. package/lib/binding/node-v131-win32-x64/getopt.dll +0 -0
  80. package/lib/binding/node-v131-win32-x64/libeay32.dll +0 -0
  81. package/lib/binding/node-v131-win32-x64/pthreadVC2.dll +0 -0
  82. package/lib/binding/node-v131-win32-x64/ssleay32.dll +0 -0
  83. package/lib/binding/node-v131-win32-x64/zlib.dll +0 -0
  84. package/lib/bitwise.js +1 -1
  85. package/lib/client.js +12 -2
  86. package/lib/commands/batch_command.js +4 -3
  87. package/lib/commands/command.js +1 -1
  88. package/lib/commands/connect_command.js +1 -1
  89. package/lib/commands/exists_command.js +21 -2
  90. package/lib/commands/index.js +1 -1
  91. package/lib/commands/query_background_command.js +1 -1
  92. package/lib/commands/read_record_command.js +1 -1
  93. package/lib/commands/stream_command.js +1 -1
  94. package/lib/commands/write_record_command.js +1 -1
  95. package/lib/config.js +1 -1
  96. package/lib/double.js +1 -1
  97. package/lib/error.js +1 -1
  98. package/lib/event_loop.js +1 -1
  99. package/lib/exp_lists.js +8 -1
  100. package/lib/exp_maps.js +11 -2
  101. package/lib/exp_operations.js +0 -2
  102. package/lib/filter.js +1 -1
  103. package/lib/geojson.js +1 -1
  104. package/lib/index_job.js +1 -1
  105. package/lib/info.js +1 -1
  106. package/lib/job.js +1 -1
  107. package/lib/key.js +1 -1
  108. package/lib/lists.js +1 -1
  109. package/lib/maps.js +1 -1
  110. package/lib/policies/apply_policy.js +1 -1
  111. package/lib/policies/base_policy.js +1 -1
  112. package/lib/policies/batch_policy.js +1 -1
  113. package/lib/policies/command_queue_policy.js +1 -1
  114. package/lib/policies/info_policy.js +1 -1
  115. package/lib/policies/map_policy.js +1 -1
  116. package/lib/policies/operate_policy.js +1 -1
  117. package/lib/policies/query_policy.js +1 -1
  118. package/lib/policies/read_policy.js +1 -1
  119. package/lib/policies/remove_policy.js +1 -1
  120. package/lib/policies/scan_policy.js +1 -1
  121. package/lib/policies/write_policy.js +1 -1
  122. package/lib/policy.js +23 -39
  123. package/lib/query.js +2 -2
  124. package/lib/query_duration.js +71 -0
  125. package/lib/record.js +1 -1
  126. package/lib/record_stream.js +1 -1
  127. package/lib/scan.js +2 -2
  128. package/lib/status.js +14 -2
  129. package/lib/typedefs.js +1 -1
  130. package/lib/udf_job.js +1 -1
  131. package/lib/utils.js +1 -1
  132. package/package.json +15 -6
  133. package/scripts/build-commands.sh +1 -0
  134. package/scripts/build-package.ps1 +15 -8
  135. package/scripts/build-package.sh +3 -2
  136. package/scripts/prebuiltBinding.js +57 -40
  137. package/src/main/client.cc +2 -2
  138. package/src/main/commands/info_node.cc +1 -1
  139. package/src/main/config.cc +1 -2
  140. package/src/main/enums/status.cc +1 -0
  141. package/test/admin.js +1 -1
  142. package/test/aerospike.js +1 -1
  143. package/test/apply.js +1 -1
  144. package/test/batch_exists.js +1 -1
  145. package/test/batch_get.js +1 -1
  146. package/test/batch_read.js +162 -147
  147. package/test/batch_select.js +1 -1
  148. package/test/bigint.js +1 -1
  149. package/test/cdt_context.js +1 -1
  150. package/test/client.js +1 -1
  151. package/test/command.js +1 -1
  152. package/test/command_queue.js +1 -1
  153. package/test/config.js +1 -1
  154. package/test/double.js +1 -1
  155. package/test/enterprise.js +1 -1
  156. package/test/error.js +1 -1
  157. package/test/exists.js +1 -1
  158. package/test/exp.js +2 -2
  159. package/test/generators/key.js +1 -1
  160. package/test/generators/metadata.js +1 -1
  161. package/test/generators/put.js +1 -1
  162. package/test/generators/record.js +1 -1
  163. package/test/generators/util.js +1 -1
  164. package/test/generators/value.js +1 -1
  165. package/test/geojson.js +1 -1
  166. package/test/get.js +1 -1
  167. package/test/index.js +1 -1
  168. package/test/index_job.js +1 -1
  169. package/test/info.js +1 -1
  170. package/test/key.js +1 -1
  171. package/test/lists.js +1 -1
  172. package/test/maps.js +1 -1
  173. package/test/operate.js +1 -1
  174. package/test/policy.js +1 -1
  175. package/test/put.js +1 -1
  176. package/test/query.js +1 -1
  177. package/test/remove.js +1 -1
  178. package/test/remove_bin.js +1 -1
  179. package/test/scan.js +1 -1
  180. package/test/select.js +1 -1
  181. package/test/stress/perfdata.js +1 -1
  182. package/test/stress/query.js +1 -1
  183. package/test/stress/scan.js +1 -1
  184. package/test/test_helper.js +1 -1
  185. package/test/truncate.js +1 -1
  186. package/test/udf.js +1 -1
  187. package/test/util/options.js +1 -1
  188. package/test/util/run_in_new_process.js +1 -1
  189. package/test/util/statefulAsyncTest.js +1 -1
  190. package/test/utils.js +1 -1
  191. package/typings/index.d.ts +16173 -1930
  192. package/lib/binding/node-v108-win32-x64/aerospike-core-client/aerospik.95E228AA.tlog/CustomBuild.command.1.tlog +0 -3
  193. package/lib/binding/node-v108-win32-x64/aerospike-core-client/aerospik.95E228AA.tlog/CustomBuild.read.1.tlog +0 -1
  194. package/lib/binding/node-v108-win32-x64/aerospike-core-client/aerospik.95E228AA.tlog/CustomBuild.write.1.tlog +0 -3
  195. package/lib/binding/node-v108-win32-x64/aerospike-core-client/aerospik.95E228AA.tlog/aerospike-core-client.lastbuildstate +0 -2
  196. package/lib/binding/node-v108-win32-x64/aerospike-core-client/aerospik.95E228AA.tlog/unsuccessfulbuild +0 -0
  197. package/lib/binding/node-v120-darwin-arm64/aerospike.node +0 -0
  198. package/lib/binding/node-v120-darwin-x64/aerospike.node +0 -0
  199. package/lib/binding/node-v120-win32-x64/aerospike.dll +0 -0
  200. package/lib/binding/node-v120-win32-x64/aerospike.node +0 -0
  201. package/lib/binding/openssl@1/node-v120-linux-arm64/aerospike.node +0 -0
  202. package/lib/binding/openssl@1/node-v120-linux-x64/aerospike.node +0 -0
  203. package/lib/binding/openssl@3/node-v108-linux-arm64/aerospike.node +0 -0
  204. package/lib/binding/openssl@3/node-v108-linux-x64/aerospike.node +0 -0
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Aerospike Node.js Client [![travis][travis-image]][travis-url] [![codecov][codecov-image]][codecov-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url]
1
+ # Aerospike Node.js Client [![codecov][codecov-image]][codecov-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url]
2
2
 
3
3
  [travis-image]: https://travis-ci.org/aerospike/aerospike-client-nodejs.svg?branch=master
4
4
  [travis-url]: https://travis-ci.org/aerospike/aerospike-client-nodejs
@@ -11,12 +11,12 @@
11
11
 
12
12
  The Aerospike Node.js client is a Node.js add-on module, written using V8.
13
13
 
14
- The client is compatible with Node.js 20 (Upcoming LTS) and 18 (LTS).
14
+ The client is compatible with Node.js 23, Node.js 22, (LTS), Node.js 20 (LTS),and 18 (LTS).
15
15
  It supports the following operating systems:
16
16
  - RHEL 8/9
17
17
  - Debian 11
18
18
  - Amazon Linux 2023
19
- - Ubuntu 20.04/22.04 (Focal Fossa, Jammy Jellyfish)
19
+ - Ubuntu 20.04/22.04/24.04 (Focal Fossa, Jammy Jellyfish, Noble Numbat)
20
20
  - Many Linux distributions compatible with one of the above OS releases.
21
21
  - macOS 12/13/14
22
22
 
@@ -78,11 +78,8 @@ const config = {
78
78
 
79
79
  const key = new Aerospike.Key('test', 'demo', 'demo')
80
80
 
81
- ;(async function () {
82
- let client
83
- try {
84
- client = await Aerospike.connect(config)
85
-
81
+ Aerospike.connect(config)
82
+ .then(client => {
86
83
  const bins = {
87
84
  i: 123,
88
85
  s: 'hello',
@@ -100,32 +97,39 @@ const key = new Aerospike.Key('test', 'demo', 'demo')
100
97
  totalTimeout : 0
101
98
  })
102
99
 
103
-
104
- await client.put(key, bins, meta, policy)
105
- const ops = [
106
- Aerospike.operations.incr('i', 1),
107
- Aerospike.operations.read('i'),
108
- Aerospike.lists.append('l', 'z'),
109
- Aerospike.maps.removeByKey('m', 'bar')
110
- ]
111
-
112
- await client.operate(key, ops)
113
- let record = await client.get(key)
114
-
115
- console.log(record.bins) // => { i: 124,
116
- // s: 'hello',
117
- // b: <Buffer 77 6f 72 6c 64>,
118
- // d: 3.1415,
119
- // g: '{"type":"Point","coordinates":[103.913,1.308]}',
120
- // l: [ 1, 'a', { x: 'y' }, 'z' ],
121
- // m: { foo: 4 } }
122
- } catch (error) {
123
- console.error('Error:', error)
124
- process.exit(1)
125
- } finally {
126
- if (client) client.close()
127
- }
128
- })()
100
+ return client.put(key, bins, meta, policy)
101
+ .then(() => {
102
+ const ops = [
103
+ Aerospike.operations.incr('i', 1),
104
+ Aerospike.operations.read('i'),
105
+ Aerospike.lists.append('l', 'z'),
106
+ Aerospike.maps.removeByKey('m', 'bar')
107
+ ]
108
+
109
+ return client.operate(key, ops)
110
+ })
111
+ .then(result => {
112
+ console.log(result.bins) // => { i: 124, l: 4, m: null }
113
+
114
+ return client.get(key)
115
+ })
116
+ .then(record => {
117
+ console.log(record.bins) // => { i: 124,
118
+ // s: 'hello',
119
+ // b: <Buffer 77 6f 72 6c 64>,
120
+ // d: 3.1415,
121
+ // g: '{"type":"Point","coordinates":[103.913,1.308]}',
122
+ // l: [ 1, 'a', { x: 'y' }, 'z' ],
123
+ // m: { foo: 4 } }
124
+ })
125
+ .then(() => client.close())
126
+ })
127
+ .catch(error => {
128
+ console.error('Error: %s [%i]', error.message, error.code)
129
+ if (error.client) {
130
+ error.client.close()
131
+ }
132
+ })
129
133
  ```
130
134
  ## Prerequisites
131
135
 
@@ -309,7 +313,7 @@ The API docs also contain a few basic tutorials:
309
313
  * [Handling asynchronous database operations using Callbacks, Promises or `async`/`await`](https://www.aerospike.com/apidocs/nodejs/tutorial-callbacks_promises_async_await.html)
310
314
 
311
315
  A variety of additional example applications are provided in the
312
- [`examples`](examples) directory of this repository.
316
+ [`examples`](https://github.com/aerospike/aerospike-client-nodejs/tree/master/examples) directory of this repository.
313
317
 
314
318
  Access backward incompatible API changes by a release at:
315
319
  https://developer.aerospike.com/client/nodejs/usage/incompatible.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
package/examples/add.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // *****************************************************************************
3
- // Copyright 2013-2023 Aerospike, Inc.
3
+ // Copyright 2013-2024 Aerospike, Inc.
4
4
  //
5
5
  // Licensed under the Apache License, Version 2.0 (the "License")
6
6
  // you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // *****************************************************************************
3
- // Copyright 2013-2023 Aerospike, Inc.
3
+ // Copyright 2013-2024 Aerospike, Inc.
4
4
  //
5
5
  // Licensed under the Apache License, Version 2.0 (the "License")
6
6
  // you may not use this file except in compliance with the License.
package/examples/apply.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // *****************************************************************************
3
- // Copyright 2013-2023 Aerospike, Inc.
3
+ // Copyright 2013-2024 Aerospike, Inc.
4
4
  //
5
5
  // Licensed under the Apache License, Version 2.0 (the "License")
6
6
  // you may not use this file except in compliance with the License.
package/examples/batch.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // *****************************************************************************
3
- // Copyright 2013-2023 Aerospike, Inc.
3
+ // Copyright 2013-2024 Aerospike, Inc.
4
4
  //
5
5
  // Licensed under the Apache License, Version 2.0 (the "License")
6
6
  // you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // *****************************************************************************
3
- // Copyright 2013-2023 Aerospike, Inc.
3
+ // Copyright 2013-2024 Aerospike, Inc.
4
4
  //
5
5
  // Licensed under the Apache License, Version 2.0 (the "License")
6
6
  // you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // *****************************************************************************
3
- // Copyright 2013-2023 Aerospike, Inc.
3
+ // Copyright 2013-2024 Aerospike, Inc.
4
4
  //
5
5
  // Licensed under the Apache License, Version 2.0 (the "License")
6
6
  // you may not use this file except in compliance with the License.
package/examples/get.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // *****************************************************************************
3
- // Copyright 2013-2023 Aerospike, Inc.
3
+ // Copyright 2013-2024 Aerospike, Inc.
4
4
  //
5
5
  // Licensed under the Apache License, Version 2.0 (the "License")
6
6
  // you may not use this file except in compliance with the License.
package/examples/info.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // *****************************************************************************
3
- // Copyright 2013-2023 Aerospike, Inc.
3
+ // Copyright 2013-2024 Aerospike, Inc.
4
4
  //
5
5
  // Licensed under the Apache License, Version 2.0 (the "License")
6
6
  // you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // *****************************************************************************
3
- // Copyright 2013-2023 Aerospike, Inc.
3
+ // Copyright 2013-2024 Aerospike, Inc.
4
4
  //
5
5
  // Licensed under the Apache License, Version 2.0 (the "License")
6
6
  // you may not use this file except in compliance with the License.
package/examples/put.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // *****************************************************************************
3
- // Copyright 2013-2023 Aerospike, Inc.
3
+ // Copyright 2013-2024 Aerospike, Inc.
4
4
  //
5
5
  // Licensed under the Apache License, Version 2.0 (the "License")
6
6
  // you may not use this file except in compliance with the License.
package/examples/query.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // *****************************************************************************
3
- // Copyright 2013-2023 Aerospike, Inc.
3
+ // Copyright 2013-2024 Aerospike, Inc.
4
4
  //
5
5
  // Licensed under the Apache License, Version 2.0 (the "License")
6
6
  // you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // *****************************************************************************
3
- // Copyright 2013-2023 Aerospike, Inc.
3
+ // Copyright 2013-2024 Aerospike, Inc.
4
4
  //
5
5
  // Licensed under the Apache License, Version 2.0 (the "License")
6
6
  // you may not use this file except in compliance with the License.
package/examples/run.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // *****************************************************************************
3
- // Copyright 2013-2023 Aerospike, Inc.
3
+ // Copyright 2013-2024 Aerospike, Inc.
4
4
  //
5
5
  // Licensed under the Apache License, Version 2.0 (the "License")
6
6
  // you may not use this file except in compliance with the License.
package/examples/scan.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // *****************************************************************************
3
- // Copyright 2013-2023 Aerospike, Inc.
3
+ // Copyright 2013-2024 Aerospike, Inc.
4
4
  //
5
5
  // Licensed under the Apache License, Version 2.0 (the "License")
6
6
  // you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // *****************************************************************************
3
- // Copyright 2013-2023 Aerospike, Inc.
3
+ // Copyright 2013-2024 Aerospike, Inc.
4
4
  //
5
5
  // Licensed under the Apache License, Version 2.0 (the "License")
6
6
  // you may not use this file except in compliance with the License.
package/examples/udf.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // *****************************************************************************
3
- // Copyright 2013-2023 Aerospike, Inc.
3
+ // Copyright 2013-2024 Aerospike, Inc.
4
4
  //
5
5
  // Licensed under the Apache License, Version 2.0 (the "License")
6
6
  // you may not use this file except in compliance with the License.
package/lib/aerospike.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -272,6 +272,20 @@ exports.Record = require('./record')
272
272
  */
273
273
  exports.Bin = require('./bin')
274
274
 
275
+ /**
276
+ * Scan class return by the {@link Client#scan} method.
277
+ *
278
+ * @summary {@link Scan} class
279
+ */
280
+ exports.Scan = require('./scan')
281
+
282
+ /**
283
+ * Query class returned by the {@link Client#query} method.
284
+ *
285
+ * @summary {@link Query} class
286
+ */
287
+ exports.Query = require('./query')
288
+
275
289
  // ========================================================================
276
290
  // Enumerations
277
291
  // ========================================================================
@@ -402,7 +416,7 @@ exports.log = as.log
402
416
  *
403
417
  * @property {number} NAMESPACE_DEFAULT - Use the default TTL value for the
404
418
  * namespace of the record.
405
- * @property {number} NEVER_EXIRE - Never expire the record.
419
+ * @property {number} NEVER_EXPIRE - Never expire the record.
406
420
  * @property {number} DONT_UPDATE - Update the record without changing the
407
421
  * record's TTL value. Requires server 3.10.1 or later.
408
422
  *
@@ -461,6 +475,20 @@ exports.ttl = as.ttl
461
475
  */
462
476
  exports.jobStatus = as.jobStatus
463
477
 
478
+ /**
479
+ * @summary IndexJob class
480
+ *
481
+ * @see {@link IndexJob} for more information.
482
+ */
483
+ exports.IndexJob = require('./index_job')
484
+
485
+ /**
486
+ * @summary Job class
487
+ *
488
+ * @see {@link Job} for more information.
489
+ */
490
+ exports.Job = require('./job')
491
+
464
492
  /**
465
493
  * @summary Enumeration of SI data types.
466
494
  *
package/lib/batch_type.js CHANGED
@@ -30,25 +30,25 @@ const batchType = as.batchTypes
30
30
  // ========================================================================
31
31
  module.exports = {
32
32
  /**
33
- * An instance of class {@link Record} that is used in a batch for read operations.
33
+ * Indicates that a {@link Record} instance is used in a batch for read operations.
34
34
  * @const {number}
35
35
  */
36
36
  BATCH_READ: batchType.BATCH_READ,
37
37
 
38
38
  /**
39
- * An instance of class {@link Record} that is used in a batch for write operations.
39
+ * Indicates that a {@link Record} instance is used in a batch for write operations.
40
40
  * @const {number}
41
41
  */
42
42
  BATCH_WRITE: batchType.BATCH_WRITE,
43
43
 
44
44
  /**
45
- * An instance of class {@link Record} that is used in a batch for applying record.
45
+ * Indicates that a {@link Record} instance is used in a batch for applying record.
46
46
  * @const {number}
47
47
  */
48
48
  BATCH_APPLY: batchType.BATCH_APPLY,
49
49
 
50
50
  /**
51
- * An instance of class {@link Record} that is used in a batch for removal operations.
51
+ * Indicates that a {@link Record} instance is used in a batch for removal operations.
52
52
  * @const {number}
53
53
  */
54
54
  BATCH_REMOVE: batchType.BATCH_REMOVE
package/lib/bigint.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/lib/bitwise.js CHANGED
@@ -157,7 +157,7 @@ exports.resize = function (bin, size, flags = 0) {
157
157
  * a value.
158
158
  *
159
159
  * @param {string} bin - The name of the bin. The bin must contain a byte value.
160
- * @param {number} offset - Offset in bytes.
160
+ * @param {number} byteOffset - Offset in bytes.
161
161
  * @param {Buffer} value - Bytes to insert.
162
162
  * @returns {BitwiseOperation} Operation that can be passed to the {@link Client#operate} command.
163
163
  */
package/lib/client.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -2285,7 +2285,17 @@ Client.prototype.exists = function exists (key, policy, callback) {
2285
2285
  policy = null
2286
2286
  }
2287
2287
 
2288
- const cmd = new Commands.Exists(this, [key, policy], callback)
2288
+ const cmd = new Commands.Exists(this, null, [key, policy], callback)
2289
+ return cmd.execute()
2290
+ }
2291
+
2292
+ Client.prototype.existsWithMetadata = function exists (key, policy, callback) {
2293
+ if (typeof policy === 'function') {
2294
+ callback = policy
2295
+ policy = null
2296
+ }
2297
+
2298
+ const cmd = new Commands.Exists(this, key, [policy], callback)
2289
2299
  return cmd.execute()
2290
2300
  }
2291
2301
 
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -20,9 +20,10 @@ const Command = require('./command')
20
20
  const Record = require('../record')
21
21
 
22
22
  class BatchResult {
23
- constructor (status, record) {
23
+ constructor (status, record, inDoubt) {
24
24
  this.status = status
25
25
  this.record = record
26
+ this.inDoubt = inDoubt
26
27
  }
27
28
  }
28
29
 
@@ -32,7 +33,7 @@ module.exports = asCommand => class BatchCommand extends Command(asCommand) {
32
33
 
33
34
  return results.map(result => {
34
35
  const record = new Record(result.key, result.bins, result.meta)
35
- return new BatchResult(result.status, record)
36
+ return new BatchResult(result.status, record, result.inDoubt)
36
37
  })
37
38
  }
38
39
  }