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 +1 -1
- package/package.json +1 -1
- package/src/index.js +4 -2
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 /\
|
|
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
package/src/index.js
CHANGED
|
@@ -417,7 +417,7 @@ module.exports = class Database {
|
|
|
417
417
|
}\``;
|
|
418
418
|
|
|
419
419
|
function containsIdWithSpace(str) {
|
|
420
|
-
return /\
|
|
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} ${
|
|
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) {
|