spice-couchbase 2.0.40 → 2.0.41

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/build/index.js CHANGED
@@ -348,11 +348,13 @@ module.exports = class Database {
348
348
  })();
349
349
  }
350
350
 
351
- update(doc_id, document) {
351
+ update(doc_id, document, expiry) {
352
352
  var _this12 = this;
353
353
 
354
354
  return _asyncToGenerator(function* () {
355
- var res = yield (_this12.use_bucket_name ? _this12.connection : _this12.collection).replace(doc_id, document);
355
+ var res = yield (_this12.use_bucket_name ? _this12.connection : _this12.collection).replace(doc_id, document, {
356
+ expiry: expiry
357
+ });
356
358
  return res.value;
357
359
  })();
358
360
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spice-couchbase",
3
- "version": "2.0.40",
3
+ "version": "2.0.41",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -309,10 +309,12 @@ module.exports = class Database {
309
309
  return res.value;
310
310
  }
311
311
 
312
- async update(doc_id, document) {
312
+ async update(doc_id, document, expiry) {
313
313
  let res = await (
314
314
  this.use_bucket_name ? this.connection : this.collection
315
- ).replace(doc_id, document);
315
+ ).replace(doc_id, document, {
316
+ expiry: expiry,
317
+ });
316
318
  return res.value;
317
319
  }
318
320