spice-couchbase 2.0.25 → 2.0.26

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
@@ -447,7 +447,7 @@ module.exports = class Database {
447
447
  var bucket = "`".concat(_this15.use_bucket_name ? _this15.bucket : _this15.collection_name, "`");
448
448
 
449
449
  function containsIdWithSpace(str) {
450
- return /\bid/i.test(str); // \b for word boundary, 'i' flag for case-insensitive matching
450
+ return /\b\.?id\b/i.test(str); // Updated regex to match "id" as a separate word or preceded by a dot (".id")
451
451
  }
452
452
 
453
453
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spice-couchbase",
3
- "version": "2.0.25",
3
+ "version": "2.0.26",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -417,7 +417,7 @@ module.exports = class Database {
417
417
  }\``;
418
418
 
419
419
  function containsIdWithSpace(str) {
420
- return /\bid/i.test(str); // \b for word boundary, 'i' flag for case-insensitive matching
420
+ return /\b\.?id\b/i.test(str); // Updated regex to match "id" as a separate word or preceded by a dot (".id")
421
421
  }
422
422
 
423
423
  try {
@@ -431,7 +431,9 @@ module.exports = class Database {
431
431
  columns = "";
432
432
  }
433
433
 
434
- const front_query = `SELECT ${columns} ${containsIdWithSpace(columns) ? "" : fix} FROM ${bucket}`;
434
+ const front_query = `SELECT ${columns} ${
435
+ containsIdWithSpace(columns) ? "" : fix
436
+ } FROM ${bucket}`;
435
437
  const conditions = [];
436
438
 
437
439
  if (this.use_bucket_name) {