mongodb 5.4.0 → 5.6.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 (81) hide show
  1. package/lib/admin.js +5 -5
  2. package/lib/admin.js.map +1 -1
  3. package/lib/bulk/common.js +4 -4
  4. package/lib/bulk/common.js.map +1 -1
  5. package/lib/change_stream.js +2 -2
  6. package/lib/change_stream.js.map +1 -1
  7. package/lib/cmap/connection_pool.js +21 -17
  8. package/lib/cmap/connection_pool.js.map +1 -1
  9. package/lib/cmap/handshake/client_metadata.js +1 -1
  10. package/lib/cmap/handshake/client_metadata.js.map +1 -1
  11. package/lib/cmap/wire_protocol/constants.js +3 -1
  12. package/lib/cmap/wire_protocol/constants.js.map +1 -1
  13. package/lib/collection.js +108 -33
  14. package/lib/collection.js.map +1 -1
  15. package/lib/cursor/list_collections_cursor.js +2 -2
  16. package/lib/cursor/list_collections_cursor.js.map +1 -1
  17. package/lib/cursor/list_indexes_cursor.js +2 -2
  18. package/lib/cursor/list_indexes_cursor.js.map +1 -1
  19. package/lib/cursor/list_search_indexes_cursor.js +14 -0
  20. package/lib/cursor/list_search_indexes_cursor.js.map +1 -0
  21. package/lib/cursor/run_command_cursor.js +94 -0
  22. package/lib/cursor/run_command_cursor.js.map +1 -0
  23. package/lib/db.js +29 -17
  24. package/lib/db.js.map +1 -1
  25. package/lib/error.js +16 -4
  26. package/lib/error.js.map +1 -1
  27. package/lib/index.js.map +1 -1
  28. package/lib/mongo_client.js +5 -7
  29. package/lib/mongo_client.js.map +1 -1
  30. package/lib/mongo_types.js +6 -1
  31. package/lib/mongo_types.js.map +1 -1
  32. package/lib/operations/create_collection.js +10 -3
  33. package/lib/operations/create_collection.js.map +1 -1
  34. package/lib/operations/drop.js +2 -3
  35. package/lib/operations/drop.js.map +1 -1
  36. package/lib/operations/search_indexes/create.js +29 -0
  37. package/lib/operations/search_indexes/create.js.map +1 -0
  38. package/lib/operations/search_indexes/drop.js +30 -0
  39. package/lib/operations/search_indexes/drop.js.map +1 -0
  40. package/lib/operations/search_indexes/update.js +30 -0
  41. package/lib/operations/search_indexes/update.js.map +1 -0
  42. package/lib/sdam/monitor.js +1 -1
  43. package/lib/sdam/monitor.js.map +1 -1
  44. package/lib/sdam/server.js +31 -19
  45. package/lib/sdam/server.js.map +1 -1
  46. package/lib/sdam/topology.js +4 -3
  47. package/lib/sdam/topology.js.map +1 -1
  48. package/lib/sessions.js +2 -2
  49. package/lib/sessions.js.map +1 -1
  50. package/lib/utils.js +19 -7
  51. package/lib/utils.js.map +1 -1
  52. package/mongodb.d.ts +112 -16
  53. package/package.json +17 -17
  54. package/src/admin.ts +5 -5
  55. package/src/bulk/common.ts +4 -4
  56. package/src/change_stream.ts +2 -2
  57. package/src/cmap/connection_pool.ts +26 -18
  58. package/src/cmap/handshake/client_metadata.ts +2 -1
  59. package/src/cmap/wire_protocol/constants.ts +2 -0
  60. package/src/collection.ts +163 -41
  61. package/src/cursor/abstract_cursor.ts +1 -1
  62. package/src/cursor/list_collections_cursor.ts +2 -2
  63. package/src/cursor/list_indexes_cursor.ts +2 -2
  64. package/src/cursor/list_search_indexes_cursor.ts +20 -0
  65. package/src/cursor/run_command_cursor.ts +140 -0
  66. package/src/db.ts +34 -21
  67. package/src/deps.ts +2 -2
  68. package/src/error.ts +20 -3
  69. package/src/index.ts +9 -0
  70. package/src/mongo_client.ts +25 -17
  71. package/src/mongo_types.ts +16 -2
  72. package/src/operations/create_collection.ts +19 -5
  73. package/src/operations/drop.ts +2 -3
  74. package/src/operations/search_indexes/create.ts +48 -0
  75. package/src/operations/search_indexes/drop.ts +35 -0
  76. package/src/operations/search_indexes/update.ts +36 -0
  77. package/src/sdam/monitor.ts +1 -1
  78. package/src/sdam/server.ts +38 -23
  79. package/src/sdam/topology.ts +8 -3
  80. package/src/sessions.ts +2 -2
  81. package/src/utils.ts +18 -10
package/lib/collection.js CHANGED
@@ -8,6 +8,7 @@ const change_stream_1 = require("./change_stream");
8
8
  const aggregation_cursor_1 = require("./cursor/aggregation_cursor");
9
9
  const find_cursor_1 = require("./cursor/find_cursor");
10
10
  const list_indexes_cursor_1 = require("./cursor/list_indexes_cursor");
11
+ const list_search_indexes_cursor_1 = require("./cursor/list_search_indexes_cursor");
11
12
  const error_1 = require("./error");
12
13
  const bulk_write_1 = require("./operations/bulk_write");
13
14
  const count_1 = require("./operations/count");
@@ -23,8 +24,11 @@ const insert_1 = require("./operations/insert");
23
24
  const is_capped_1 = require("./operations/is_capped");
24
25
  const options_operation_1 = require("./operations/options_operation");
25
26
  const rename_1 = require("./operations/rename");
27
+ const create_1 = require("./operations/search_indexes/create");
28
+ const drop_2 = require("./operations/search_indexes/drop");
29
+ const update_1 = require("./operations/search_indexes/update");
26
30
  const stats_1 = require("./operations/stats");
27
- const update_1 = require("./operations/update");
31
+ const update_2 = require("./operations/update");
28
32
  const read_concern_1 = require("./read_concern");
29
33
  const read_preference_1 = require("./read_preference");
30
34
  const utils_1 = require("./utils");
@@ -66,13 +70,14 @@ class Collection {
66
70
  this.s = {
67
71
  db,
68
72
  options,
69
- namespace: new utils_1.MongoDBNamespace(db.databaseName, name),
73
+ namespace: new utils_1.MongoDBCollectionNamespace(db.databaseName, name),
70
74
  pkFactory: db.options?.pkFactory ?? utils_1.DEFAULT_PK_FACTORY,
71
75
  readPreference: read_preference_1.ReadPreference.fromOptions(options),
72
76
  bsonOptions: (0, bson_1.resolveBSONOptions)(options, db),
73
77
  readConcern: read_concern_1.ReadConcern.fromOptions(options),
74
78
  writeConcern: write_concern_1.WriteConcern.fromOptions(options)
75
79
  };
80
+ this.client = db.client;
76
81
  }
77
82
  /**
78
83
  * The name of the database this collection belongs to
@@ -84,14 +89,21 @@ class Collection {
84
89
  * The name of this collection
85
90
  */
86
91
  get collectionName() {
87
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
88
92
  return this.s.namespace.collection;
89
93
  }
90
94
  /**
91
95
  * The namespace of this collection, in the format `${this.dbName}.${this.collectionName}`
92
96
  */
93
97
  get namespace() {
94
- return this.s.namespace.toString();
98
+ return this.fullNamespace.toString();
99
+ }
100
+ /**
101
+ * @internal
102
+ *
103
+ * The `MongoDBNamespace` for the collection.
104
+ */
105
+ get fullNamespace() {
106
+ return this.s.namespace;
95
107
  }
96
108
  /**
97
109
  * The current readConcern of the collection. If not explicitly defined for
@@ -142,7 +154,7 @@ class Collection {
142
154
  * @param options - Optional settings for the command
143
155
  */
144
156
  async insertOne(doc, options) {
145
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new insert_1.InsertOneOperation(this, doc, (0, utils_1.resolveOptions)(this, options)));
157
+ return (0, execute_operation_1.executeOperation)(this.client, new insert_1.InsertOneOperation(this, doc, (0, utils_1.resolveOptions)(this, options)));
146
158
  }
147
159
  /**
148
160
  * Inserts an array of documents into MongoDB. If documents passed in do not contain the **_id** field,
@@ -153,7 +165,7 @@ class Collection {
153
165
  * @param options - Optional settings for the command
154
166
  */
155
167
  async insertMany(docs, options) {
156
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new insert_1.InsertManyOperation(this, docs, (0, utils_1.resolveOptions)(this, options ?? { ordered: true })));
168
+ return (0, execute_operation_1.executeOperation)(this.client, new insert_1.InsertManyOperation(this, docs, (0, utils_1.resolveOptions)(this, options ?? { ordered: true })));
157
169
  }
158
170
  /**
159
171
  * Perform a bulkWrite operation without a fluent API
@@ -178,7 +190,7 @@ class Collection {
178
190
  if (!Array.isArray(operations)) {
179
191
  throw new error_1.MongoInvalidArgumentError('Argument "operations" must be an array of documents');
180
192
  }
181
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new bulk_write_1.BulkWriteOperation(this, operations, (0, utils_1.resolveOptions)(this, options ?? { ordered: true })));
193
+ return (0, execute_operation_1.executeOperation)(this.client, new bulk_write_1.BulkWriteOperation(this, operations, (0, utils_1.resolveOptions)(this, options ?? { ordered: true })));
182
194
  }
183
195
  /**
184
196
  * Update a single document in a collection
@@ -188,7 +200,7 @@ class Collection {
188
200
  * @param options - Optional settings for the command
189
201
  */
190
202
  async updateOne(filter, update, options) {
191
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new update_1.UpdateOneOperation(this, filter, update, (0, utils_1.resolveOptions)(this, options)));
203
+ return (0, execute_operation_1.executeOperation)(this.client, new update_2.UpdateOneOperation(this, filter, update, (0, utils_1.resolveOptions)(this, options)));
192
204
  }
193
205
  /**
194
206
  * Replace a document in a collection with another document
@@ -198,7 +210,7 @@ class Collection {
198
210
  * @param options - Optional settings for the command
199
211
  */
200
212
  async replaceOne(filter, replacement, options) {
201
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new update_1.ReplaceOneOperation(this, filter, replacement, (0, utils_1.resolveOptions)(this, options)));
213
+ return (0, execute_operation_1.executeOperation)(this.client, new update_2.ReplaceOneOperation(this, filter, replacement, (0, utils_1.resolveOptions)(this, options)));
202
214
  }
203
215
  /**
204
216
  * Update multiple documents in a collection
@@ -208,7 +220,7 @@ class Collection {
208
220
  * @param options - Optional settings for the command
209
221
  */
210
222
  async updateMany(filter, update, options) {
211
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new update_1.UpdateManyOperation(this, filter, update, (0, utils_1.resolveOptions)(this, options)));
223
+ return (0, execute_operation_1.executeOperation)(this.client, new update_2.UpdateManyOperation(this, filter, update, (0, utils_1.resolveOptions)(this, options)));
212
224
  }
213
225
  /**
214
226
  * Delete a document from a collection
@@ -217,7 +229,7 @@ class Collection {
217
229
  * @param options - Optional settings for the command
218
230
  */
219
231
  async deleteOne(filter = {}, options = {}) {
220
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new delete_1.DeleteOneOperation(this, filter, (0, utils_1.resolveOptions)(this, options)));
232
+ return (0, execute_operation_1.executeOperation)(this.client, new delete_1.DeleteOneOperation(this, filter, (0, utils_1.resolveOptions)(this, options)));
221
233
  }
222
234
  /**
223
235
  * Delete multiple documents from a collection
@@ -226,7 +238,7 @@ class Collection {
226
238
  * @param options - Optional settings for the command
227
239
  */
228
240
  async deleteMany(filter = {}, options = {}) {
229
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new delete_1.DeleteManyOperation(this, filter, (0, utils_1.resolveOptions)(this, options)));
241
+ return (0, execute_operation_1.executeOperation)(this.client, new delete_1.DeleteManyOperation(this, filter, (0, utils_1.resolveOptions)(this, options)));
230
242
  }
231
243
  /**
232
244
  * Rename the collection.
@@ -239,7 +251,7 @@ class Collection {
239
251
  */
240
252
  async rename(newName, options) {
241
253
  // Intentionally, we do not inherit options from parent for this operation.
242
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new rename_1.RenameOperation(this, newName, {
254
+ return (0, execute_operation_1.executeOperation)(this.client, new rename_1.RenameOperation(this, newName, {
243
255
  ...options,
244
256
  readPreference: read_preference_1.ReadPreference.PRIMARY
245
257
  }));
@@ -250,13 +262,13 @@ class Collection {
250
262
  * @param options - Optional settings for the command
251
263
  */
252
264
  async drop(options) {
253
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new drop_1.DropCollectionOperation(this.s.db, this.collectionName, options));
265
+ return (0, execute_operation_1.executeOperation)(this.client, new drop_1.DropCollectionOperation(this.s.db, this.collectionName, options));
254
266
  }
255
267
  async findOne(filter = {}, options = {}) {
256
268
  return this.find(filter, options).limit(-1).batchSize(1).next();
257
269
  }
258
270
  find(filter = {}, options = {}) {
259
- return new find_cursor_1.FindCursor(this.s.db.s.client, this.s.namespace, filter, (0, utils_1.resolveOptions)(this, options));
271
+ return new find_cursor_1.FindCursor(this.client, this.s.namespace, filter, (0, utils_1.resolveOptions)(this, options));
260
272
  }
261
273
  /**
262
274
  * Returns the options of the collection.
@@ -264,7 +276,7 @@ class Collection {
264
276
  * @param options - Optional settings for the command
265
277
  */
266
278
  async options(options) {
267
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new options_operation_1.OptionsOperation(this, (0, utils_1.resolveOptions)(this, options)));
279
+ return (0, execute_operation_1.executeOperation)(this.client, new options_operation_1.OptionsOperation(this, (0, utils_1.resolveOptions)(this, options)));
268
280
  }
269
281
  /**
270
282
  * Returns if the collection is a capped collection
@@ -272,7 +284,7 @@ class Collection {
272
284
  * @param options - Optional settings for the command
273
285
  */
274
286
  async isCapped(options) {
275
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new is_capped_1.IsCappedOperation(this, (0, utils_1.resolveOptions)(this, options)));
287
+ return (0, execute_operation_1.executeOperation)(this.client, new is_capped_1.IsCappedOperation(this, (0, utils_1.resolveOptions)(this, options)));
276
288
  }
277
289
  /**
278
290
  * Creates an index on the db and collection collection.
@@ -303,7 +315,7 @@ class Collection {
303
315
  * ```
304
316
  */
305
317
  async createIndex(indexSpec, options) {
306
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new indexes_1.CreateIndexOperation(this, this.collectionName, indexSpec, (0, utils_1.resolveOptions)(this, options)));
318
+ return (0, execute_operation_1.executeOperation)(this.client, new indexes_1.CreateIndexOperation(this, this.collectionName, indexSpec, (0, utils_1.resolveOptions)(this, options)));
307
319
  }
308
320
  /**
309
321
  * Creates multiple indexes in the collection, this method is only supported for
@@ -337,7 +349,7 @@ class Collection {
337
349
  * ```
338
350
  */
339
351
  async createIndexes(indexSpecs, options) {
340
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new indexes_1.CreateIndexesOperation(this, this.collectionName, indexSpecs, (0, utils_1.resolveOptions)(this, { ...options, maxTimeMS: undefined })));
352
+ return (0, execute_operation_1.executeOperation)(this.client, new indexes_1.CreateIndexesOperation(this, this.collectionName, indexSpecs, (0, utils_1.resolveOptions)(this, { ...options, maxTimeMS: undefined })));
341
353
  }
342
354
  /**
343
355
  * Drops an index from this collection.
@@ -346,7 +358,7 @@ class Collection {
346
358
  * @param options - Optional settings for the command
347
359
  */
348
360
  async dropIndex(indexName, options) {
349
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new indexes_1.DropIndexOperation(this, indexName, {
361
+ return (0, execute_operation_1.executeOperation)(this.client, new indexes_1.DropIndexOperation(this, indexName, {
350
362
  ...(0, utils_1.resolveOptions)(this, options),
351
363
  readPreference: read_preference_1.ReadPreference.primary
352
364
  }));
@@ -357,7 +369,7 @@ class Collection {
357
369
  * @param options - Optional settings for the command
358
370
  */
359
371
  async dropIndexes(options) {
360
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new indexes_1.DropIndexesOperation(this, (0, utils_1.resolveOptions)(this, options)));
372
+ return (0, execute_operation_1.executeOperation)(this.client, new indexes_1.DropIndexesOperation(this, (0, utils_1.resolveOptions)(this, options)));
361
373
  }
362
374
  /**
363
375
  * Get the list of all indexes information for the collection.
@@ -374,7 +386,7 @@ class Collection {
374
386
  * @param options - Optional settings for the command
375
387
  */
376
388
  async indexExists(indexes, options) {
377
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new indexes_1.IndexExistsOperation(this, indexes, (0, utils_1.resolveOptions)(this, options)));
389
+ return (0, execute_operation_1.executeOperation)(this.client, new indexes_1.IndexExistsOperation(this, indexes, (0, utils_1.resolveOptions)(this, options)));
378
390
  }
379
391
  /**
380
392
  * Retrieves this collections index info.
@@ -382,7 +394,7 @@ class Collection {
382
394
  * @param options - Optional settings for the command
383
395
  */
384
396
  async indexInformation(options) {
385
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new indexes_1.IndexInformationOperation(this.s.db, this.collectionName, (0, utils_1.resolveOptions)(this, options)));
397
+ return (0, execute_operation_1.executeOperation)(this.client, new indexes_1.IndexInformationOperation(this.s.db, this.collectionName, (0, utils_1.resolveOptions)(this, options)));
386
398
  }
387
399
  /**
388
400
  * Gets an estimate of the count of documents in a collection using collection metadata.
@@ -398,7 +410,7 @@ class Collection {
398
410
  * @param options - Optional settings for the command
399
411
  */
400
412
  async estimatedDocumentCount(options) {
401
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new estimated_document_count_1.EstimatedDocumentCountOperation(this, (0, utils_1.resolveOptions)(this, options)));
413
+ return (0, execute_operation_1.executeOperation)(this.client, new estimated_document_count_1.EstimatedDocumentCountOperation(this, (0, utils_1.resolveOptions)(this, options)));
402
414
  }
403
415
  /**
404
416
  * Gets the number of documents matching the filter.
@@ -426,10 +438,10 @@ class Collection {
426
438
  * @see https://www.mongodb.com/docs/manual/reference/operator/query/centerSphere/#op._S_centerSphere
427
439
  */
428
440
  async countDocuments(filter = {}, options = {}) {
429
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new count_documents_1.CountDocumentsOperation(this, filter, (0, utils_1.resolveOptions)(this, options)));
441
+ return (0, execute_operation_1.executeOperation)(this.client, new count_documents_1.CountDocumentsOperation(this, filter, (0, utils_1.resolveOptions)(this, options)));
430
442
  }
431
443
  async distinct(key, filter = {}, options = {}) {
432
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new distinct_1.DistinctOperation(this, key, filter, (0, utils_1.resolveOptions)(this, options)));
444
+ return (0, execute_operation_1.executeOperation)(this.client, new distinct_1.DistinctOperation(this, key, filter, (0, utils_1.resolveOptions)(this, options)));
433
445
  }
434
446
  /**
435
447
  * Retrieve all the indexes on the collection.
@@ -437,7 +449,7 @@ class Collection {
437
449
  * @param options - Optional settings for the command
438
450
  */
439
451
  async indexes(options) {
440
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new indexes_1.IndexesOperation(this, (0, utils_1.resolveOptions)(this, options)));
452
+ return (0, execute_operation_1.executeOperation)(this.client, new indexes_1.IndexesOperation(this, (0, utils_1.resolveOptions)(this, options)));
441
453
  }
442
454
  /**
443
455
  * Get all the collection statistics.
@@ -448,7 +460,7 @@ class Collection {
448
460
  * @param options - Optional settings for the command
449
461
  */
450
462
  async stats(options) {
451
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new stats_1.CollStatsOperation(this, options));
463
+ return (0, execute_operation_1.executeOperation)(this.client, new stats_1.CollStatsOperation(this, options));
452
464
  }
453
465
  /**
454
466
  * Find a document and delete it in one atomic operation. Requires a write lock for the duration of the operation.
@@ -457,7 +469,7 @@ class Collection {
457
469
  * @param options - Optional settings for the command
458
470
  */
459
471
  async findOneAndDelete(filter, options) {
460
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new find_and_modify_1.FindOneAndDeleteOperation(this, filter, (0, utils_1.resolveOptions)(this, options)));
472
+ return (0, execute_operation_1.executeOperation)(this.client, new find_and_modify_1.FindOneAndDeleteOperation(this, filter, (0, utils_1.resolveOptions)(this, options)));
461
473
  }
462
474
  /**
463
475
  * Find a document and replace it in one atomic operation. Requires a write lock for the duration of the operation.
@@ -467,7 +479,7 @@ class Collection {
467
479
  * @param options - Optional settings for the command
468
480
  */
469
481
  async findOneAndReplace(filter, replacement, options) {
470
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new find_and_modify_1.FindOneAndReplaceOperation(this, filter, replacement, (0, utils_1.resolveOptions)(this, options)));
482
+ return (0, execute_operation_1.executeOperation)(this.client, new find_and_modify_1.FindOneAndReplaceOperation(this, filter, replacement, (0, utils_1.resolveOptions)(this, options)));
471
483
  }
472
484
  /**
473
485
  * Find a document and update it in one atomic operation. Requires a write lock for the duration of the operation.
@@ -477,7 +489,7 @@ class Collection {
477
489
  * @param options - Optional settings for the command
478
490
  */
479
491
  async findOneAndUpdate(filter, update, options) {
480
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new find_and_modify_1.FindOneAndUpdateOperation(this, filter, update, (0, utils_1.resolveOptions)(this, options)));
492
+ return (0, execute_operation_1.executeOperation)(this.client, new find_and_modify_1.FindOneAndUpdateOperation(this, filter, update, (0, utils_1.resolveOptions)(this, options)));
481
493
  }
482
494
  /**
483
495
  * Execute an aggregation framework pipeline against the collection, needs MongoDB \>= 2.2
@@ -489,7 +501,7 @@ class Collection {
489
501
  if (!Array.isArray(pipeline)) {
490
502
  throw new error_1.MongoInvalidArgumentError('Argument "pipeline" must be an array of aggregation stages');
491
503
  }
492
- return new aggregation_cursor_1.AggregationCursor(this.s.db.s.client, this.s.namespace, pipeline, (0, utils_1.resolveOptions)(this, options));
504
+ return new aggregation_cursor_1.AggregationCursor(this.client, this.s.namespace, pipeline, (0, utils_1.resolveOptions)(this, options));
493
505
  }
494
506
  /**
495
507
  * Create a new Change Stream, watching for new changes (insertions, updates, replacements, deletions, and invalidations) in this collection.
@@ -572,7 +584,70 @@ class Collection {
572
584
  * @param options - Optional settings for the command
573
585
  */
574
586
  async count(filter = {}, options = {}) {
575
- return (0, execute_operation_1.executeOperation)(this.s.db.s.client, new count_1.CountOperation(utils_1.MongoDBNamespace.fromString(this.namespace), filter, (0, utils_1.resolveOptions)(this, options)));
587
+ return (0, execute_operation_1.executeOperation)(this.client, new count_1.CountOperation(this.fullNamespace, filter, (0, utils_1.resolveOptions)(this, options)));
588
+ }
589
+ listSearchIndexes(indexNameOrOptions, options) {
590
+ options =
591
+ typeof indexNameOrOptions === 'object' ? indexNameOrOptions : options == null ? {} : options;
592
+ const indexName = indexNameOrOptions == null
593
+ ? null
594
+ : typeof indexNameOrOptions === 'object'
595
+ ? null
596
+ : indexNameOrOptions;
597
+ return new list_search_indexes_cursor_1.ListSearchIndexesCursor(this, indexName, options);
598
+ }
599
+ /**
600
+ * @internal
601
+ *
602
+ * Creates a single search index for the collection.
603
+ *
604
+ * @param description - The index description for the new search index.
605
+ * @returns A promise that resolves to the name of the new search index.
606
+ *
607
+ * @remarks Only available when used against a 7.0+ Atlas cluster.
608
+ */
609
+ async createSearchIndex(description) {
610
+ const [index] = await this.createSearchIndexes([description]);
611
+ return index;
612
+ }
613
+ /**
614
+ * @internal
615
+ *
616
+ * Creates multiple search indexes for the current collection.
617
+ *
618
+ * @param descriptions - An array of `SearchIndexDescription`s for the new search indexes.
619
+ * @returns A promise that resolves to an array of the newly created search index names.
620
+ *
621
+ * @remarks Only available when used against a 7.0+ Atlas cluster.
622
+ * @returns
623
+ */
624
+ async createSearchIndexes(descriptions) {
625
+ return (0, execute_operation_1.executeOperation)(this.client, new create_1.CreateSearchIndexesOperation(this, descriptions));
626
+ }
627
+ /**
628
+ * @internal
629
+ *
630
+ * Deletes a search index by index name.
631
+ *
632
+ * @param name - The name of the search index to be deleted.
633
+ *
634
+ * @remarks Only available when used against a 7.0+ Atlas cluster.
635
+ */
636
+ async dropSearchIndex(name) {
637
+ return (0, execute_operation_1.executeOperation)(this.client, new drop_2.DropSearchIndexOperation(this, name));
638
+ }
639
+ /**
640
+ * @internal
641
+ *
642
+ * Updates a search index by replacing the existing index definition with the provided definition.
643
+ *
644
+ * @param name - The name of the search index to update.
645
+ * @param definition - The new search index definition.
646
+ *
647
+ * @remarks Only available when used against a 7.0+ Atlas cluster.
648
+ */
649
+ async updateSearchIndex(name, definition) {
650
+ return (0, execute_operation_1.executeOperation)(this.client, new update_1.UpdateSearchIndexOperation(this, name, definition));
576
651
  }
577
652
  }
578
653
  exports.Collection = Collection;
@@ -1 +1 @@
1
- {"version":3,"file":"collection.js","sourceRoot":"","sources":["../src/collection.ts"],"names":[],"mappings":";;;AAAA,iCAA4E;AAE5E,4CAAsD;AACtD,gDAA0D;AAC1D,mDAA0F;AAC1F,oEAAgE;AAChE,sDAAkD;AAClD,sEAAiE;AAEjE,mCAAoD;AAYpD,wDAA6D;AAE7D,8CAAkE;AAClE,kEAA8F;AAC9F,gDAK6B;AAC7B,oDAA2E;AAC3E,4CAAmF;AACnF,oFAG+C;AAC/C,sEAAkE;AAElE,kEAOsC;AACtC,kDAa8B;AAC9B,gDAM6B;AAC7B,sDAA2D;AAE3D,sEAAkE;AAClE,gDAAqE;AACrE,8CAAqF;AACrF,gDAO6B;AAC7B,iDAA8D;AAC9D,uDAAuE;AACvE,mCAMiB;AACjB,mDAAoE;AAmCpE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAa,UAAU;IAIrB;;;OAGG;IACH,YAAY,EAAM,EAAE,IAAY,EAAE,OAA2B;QAC3D,IAAA,2BAAmB,EAAC,IAAI,CAAC,CAAC;QAE1B,iBAAiB;QACjB,IAAI,CAAC,CAAC,GAAG;YACP,EAAE;YACF,OAAO;YACP,SAAS,EAAE,IAA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,IAAI,CAAC,MAAM,EACX,IAAI,qCAA4B,CAAC,IAAsB,EAAE,YAAY,CAAC,CACvE,CAAC;IACJ,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,eAAe,CAAC,IAAY;QAChC,OAAO,IAAA,oCAAgB,EACrB,IAAI,CAAC,MAAM,EACX,IAAI,+BAAwB,CAAC,IAAsB,EAAE,IAAI,CAAC,CAC3D,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,iBAAiB,CAAC,IAAY,EAAE,UAAoB;QACxD,OAAO,IAAA,oCAAgB,EACrB,IAAI,CAAC,MAAM,EACX,IAAI,mCAA0B,CAAC,IAAsB,EAAE,IAAI,EAAE,UAAU,CAAC,CACzE,CAAC;IACJ,CAAC;CACF;AAl7BD,gCAk7BC"}
@@ -7,7 +7,7 @@ const abstract_cursor_1 = require("./abstract_cursor");
7
7
  /** @public */
8
8
  class ListCollectionsCursor extends abstract_cursor_1.AbstractCursor {
9
9
  constructor(db, filter, options) {
10
- super(db.s.client, db.s.namespace, options);
10
+ super(db.client, db.s.namespace, options);
11
11
  this.parent = db;
12
12
  this.filter = filter;
13
13
  this.options = options;
@@ -25,7 +25,7 @@ class ListCollectionsCursor extends abstract_cursor_1.AbstractCursor {
25
25
  ...this.options,
26
26
  session
27
27
  });
28
- (0, execute_operation_1.executeOperation)(this.parent.s.client, operation, (err, response) => {
28
+ (0, execute_operation_1.executeOperation)(this.parent.client, operation, (err, response) => {
29
29
  if (err || response == null)
30
30
  return callback(err);
31
31
  // TODO: NODE-2882
@@ -1 +1 @@
1
- {"version":3,"file":"list_collections_cursor.js","sourceRoot":"","sources":["../../src/cursor/list_collections_cursor.ts"],"names":[],"mappings":";;;AAEA,uEAAoF;AACpF,qEAIwC;AAGxC,uDAAmD;AAEnD,cAAc;AACd,MAAa,qBAIX,SAAQ,gCAAiB;IAKzB,YAAY,EAAM,EAAE,MAAgB,EAAE,OAAgC;QACpE,KAAK,CAAC,EAAE,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MAAgB,EAAE,OAAgC;QACpE,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC1C,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,KAAK;QACH,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;YACzD,GAAG,IAAI,CAAC,OAAO;YACf,GAAG,IAAI,CAAC,aAAa;SACtB,CAAC,CAAC;IACL,CAAC;IAED,gBAAgB;IAChB,WAAW,CAAC,OAAkC,EAAE,QAAmC;QACjF,MAAM,SAAS,GAAG,IAAI,2CAAwB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;YACvE,GAAG,IAAI,CAAC,aAAa;YACrB,GAAG,IAAI,CAAC,OAAO;YACf,OAAO;SACR,CAAC,CAAC;QAEH,IAAA,oCAAgB,EAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE;YAChE,IAAI,GAAG,IAAI,QAAQ,IAAI,IAAI;gBAAE,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC;YAElD,kBAAkB;YAClB,QAAQ,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;QACvE,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAtCD,sDAsCC"}
@@ -7,7 +7,7 @@ const abstract_cursor_1 = require("./abstract_cursor");
7
7
  /** @public */
8
8
  class ListIndexesCursor extends abstract_cursor_1.AbstractCursor {
9
9
  constructor(collection, options) {
10
- super(collection.s.db.s.client, collection.s.namespace, options);
10
+ super(collection.client, collection.s.namespace, options);
11
11
  this.parent = collection;
12
12
  this.options = options;
13
13
  }
@@ -24,7 +24,7 @@ class ListIndexesCursor extends abstract_cursor_1.AbstractCursor {
24
24
  ...this.options,
25
25
  session
26
26
  });
27
- (0, execute_operation_1.executeOperation)(this.parent.s.db.s.client, operation, (err, response) => {
27
+ (0, execute_operation_1.executeOperation)(this.parent.client, operation, (err, response) => {
28
28
  if (err || response == null)
29
29
  return callback(err);
30
30
  // TODO: NODE-2882
@@ -1 +1 @@
1
- {"version":3,"file":"list_indexes_cursor.js","sourceRoot":"","sources":["../../src/cursor/list_indexes_cursor.ts"],"names":[],"mappings":";;;AACA,uEAAoF;AACpF,mDAAiF;AAGjF,uDAAmD;AAEnD,cAAc;AACd,MAAa,iBAAkB,SAAQ,gCAAc;IAInD,YAAY,UAAsB,EAAE,OAA4B;QAC9D,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACjE,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,KAAK;QACH,OAAO,IAAI,iBAAiB,CAAC,IAAI,CAAC,MAAM,EAAE;YACxC,GAAG,IAAI,CAAC,OAAO;YACf,GAAG,IAAI,CAAC,aAAa;SACtB,CAAC,CAAC;IACL,CAAC;IAED,gBAAgB;IAChB,WAAW,CAAC,OAAkC,EAAE,QAAmC;QACjF,MAAM,SAAS,GAAG,IAAI,8BAAoB,CAAC,IAAI,CAAC,MAAM,EAAE;YACtD,GAAG,IAAI,CAAC,aAAa;YACrB,GAAG,IAAI,CAAC,OAAO;YACf,OAAO;SACR,CAAC,CAAC;QAEH,IAAA,oCAAgB,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,GAAG,EAAE,QA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CAAC,GAAG,CAAC,CAAC;YAElD,kBAAkB;YAClB,QAAQ,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;QACvE,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAhCD,8CAgCC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListSearchIndexesCursor = void 0;
4
+ const aggregation_cursor_1 = require("./aggregation_cursor");
5
+ /** @internal */
6
+ class ListSearchIndexesCursor extends aggregation_cursor_1.AggregationCursor {
7
+ /** @internal */
8
+ constructor({ fullNamespace: ns, client }, name, options = {}) {
9
+ const pipeline = name == null ? [{ $listSearchIndexes: {} }] : [{ $listSearchIndexes: { name } }];
10
+ super(client, ns, pipeline, options);
11
+ }
12
+ }
13
+ exports.ListSearchIndexesCursor = ListSearchIndexesCursor;
14
+ //# sourceMappingURL=list_search_indexes_cursor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list_search_indexes_cursor.js","sourceRoot":"","sources":["../../src/cursor/list_search_indexes_cursor.ts"],"names":[],"mappings":";;;AAEA,6DAAyD;AAKzD,gBAAgB;AAChB,MAAa,uBAAwB,SAAQ,sCAAmC;IAC9E,gBAAgB;IAChB,YACE,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,EAAc,EACzC,IAAmB,EACnB,UAAoC,EAAE;QAEtC,MAAM,QAAQ,GACZ,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QACnF,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;CACF;AAXD,0DAWC"}
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RunCommandCursor = void 0;
4
+ const error_1 = require("../error");
5
+ const execute_operation_1 = require("../operations/execute_operation");
6
+ const get_more_1 = require("../operations/get_more");
7
+ const run_command_1 = require("../operations/run_command");
8
+ const utils_1 = require("../utils");
9
+ const abstract_cursor_1 = require("./abstract_cursor");
10
+ /** @public */
11
+ class RunCommandCursor extends abstract_cursor_1.AbstractCursor {
12
+ /**
13
+ * Controls the `getMore.comment` field
14
+ * @param comment - any BSON value
15
+ */
16
+ setComment(comment) {
17
+ this.getMoreOptions.comment = comment;
18
+ return this;
19
+ }
20
+ /**
21
+ * Controls the `getMore.maxTimeMS` field. Only valid when cursor is tailable await
22
+ * @param maxTimeMS - the number of milliseconds to wait for new data
23
+ */
24
+ setMaxTimeMS(maxTimeMS) {
25
+ this.getMoreOptions.maxAwaitTimeMS = maxTimeMS;
26
+ return this;
27
+ }
28
+ /**
29
+ * Controls the `getMore.batchSize` field
30
+ * @param maxTimeMS - the number documents to return in the `nextBatch`
31
+ */
32
+ setBatchSize(batchSize) {
33
+ this.getMoreOptions.batchSize = batchSize;
34
+ return this;
35
+ }
36
+ /** Unsupported for RunCommandCursor */
37
+ clone() {
38
+ throw new error_1.MongoAPIError('Clone not supported, create a new cursor with db.runCursorCommand');
39
+ }
40
+ /** Unsupported for RunCommandCursor: readConcern must be configured directly on command document */
41
+ withReadConcern(_) {
42
+ throw new error_1.MongoAPIError('RunCommandCursor does not support readConcern it must be attached to the command being run');
43
+ }
44
+ /** Unsupported for RunCommandCursor: various cursor flags must be configured directly on command document */
45
+ addCursorFlag(_, __) {
46
+ throw new error_1.MongoAPIError('RunCommandCursor does not support cursor flags, they must be attached to the command being run');
47
+ }
48
+ /** Unsupported for RunCommandCursor: maxTimeMS must be configured directly on command document */
49
+ maxTimeMS(_) {
50
+ throw new error_1.MongoAPIError('maxTimeMS must be configured on the command document directly, to configure getMore.maxTimeMS use cursor.setMaxTimeMS()');
51
+ }
52
+ /** Unsupported for RunCommandCursor: batchSize must be configured directly on command document */
53
+ batchSize(_) {
54
+ throw new error_1.MongoAPIError('batchSize must be configured on the command document directly, to configure getMore.batchSize use cursor.setBatchSize()');
55
+ }
56
+ /** @internal */
57
+ constructor(db, command, options = {}) {
58
+ super(db.client, (0, utils_1.ns)(db.namespace), options);
59
+ this.getMoreOptions = {};
60
+ this.db = db;
61
+ this.command = Object.freeze({ ...command });
62
+ }
63
+ /** @internal */
64
+ _initialize(session, callback) {
65
+ const operation = new run_command_1.RunCommandOperation(this.db, this.command, {
66
+ ...this.cursorOptions,
67
+ session: session,
68
+ readPreference: this.cursorOptions.readPreference
69
+ });
70
+ (0, execute_operation_1.executeOperation)(this.client, operation).then(response => {
71
+ if (response.cursor == null) {
72
+ callback(new error_1.MongoUnexpectedServerResponseError('Expected server to respond with cursor'));
73
+ return;
74
+ }
75
+ callback(undefined, {
76
+ server: operation.server,
77
+ session,
78
+ response
79
+ });
80
+ }, err => callback(err));
81
+ }
82
+ /** @internal */
83
+ _getMore(_batchSize, callback) {
84
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
85
+ const getMoreOperation = new get_more_1.GetMoreOperation(this.namespace, this.id, this.server, {
86
+ ...this.cursorOptions,
87
+ session: this.session,
88
+ ...this.getMoreOptions
89
+ });
90
+ (0, execute_operation_1.executeOperation)(this.client, getMoreOperation, callback);
91
+ }
92
+ }
93
+ exports.RunCommandCursor = RunCommandCursor;
94
+ //# sourceMappingURL=run_command_cursor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run_command_cursor.js","sourceRoot":"","sources":["../../src/cursor/run_command_cursor.ts"],"names":[],"mappings":";;;AAEA,oCAA6E;AAC7E,uEAAoF;AACpF,qDAA0D;AAC1D,2DAAgE;AAIhE,oCAAwC;AACxC,uDAAmD;AAcnD,cAAc;AACd,MAAa,gBAAiB,SAAQ,gCAAc;IAQlD;;;OAGG;IACI,UAAU,CAAC,OAAY;QAC5B,IAAI,CAAC,cAAc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