@samet-it/be-couchbase-common 1.0.14 → 1.0.16
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.
|
@@ -122,7 +122,7 @@ let CbAdapterService = class CbAdapterService {
|
|
|
122
122
|
var _a;
|
|
123
123
|
switch (typeof value) {
|
|
124
124
|
case "string":
|
|
125
|
-
return
|
|
125
|
+
return JSON.stringify(value);
|
|
126
126
|
case "number":
|
|
127
127
|
return `${value}`;
|
|
128
128
|
case "boolean":
|
|
@@ -137,9 +137,9 @@ let CbAdapterService = class CbAdapterService {
|
|
|
137
137
|
case "bigint":
|
|
138
138
|
return `"${value.toString(10)}"`;
|
|
139
139
|
case "symbol":
|
|
140
|
-
return
|
|
140
|
+
return JSON.stringify(value.description);
|
|
141
141
|
case "function":
|
|
142
|
-
return
|
|
142
|
+
return JSON.stringify(`${(_a = value.name) !== null && _a !== void 0 ? _a : '~fn~'}[${value.length}]()`);
|
|
143
143
|
}
|
|
144
144
|
return 'null';
|
|
145
145
|
}
|
|
@@ -59,6 +59,7 @@ class CbFilterUtilImpl {
|
|
|
59
59
|
return `${this._where(opt)} ${this.cb.f(field)} IN ${this.cb.v(items[0])}`;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
+
return undefined;
|
|
62
63
|
}
|
|
63
64
|
/** @inheritDoc */
|
|
64
65
|
sqlBool(opt, field, value) {
|
|
@@ -69,7 +70,7 @@ class CbFilterUtilImpl {
|
|
|
69
70
|
}
|
|
70
71
|
/** @inheritDoc */
|
|
71
72
|
sqlBetween(opt, field, value) {
|
|
72
|
-
if (Array.isArray(value) && value.length
|
|
73
|
+
if (Array.isArray(value) && value.length > 0) {
|
|
73
74
|
const [first, last] = value.map(v => (v instanceof Date) ? v.toISOString() : v);
|
|
74
75
|
if (first !== undefined && last !== undefined) {
|
|
75
76
|
return `${this._where(opt)} ${this.cb.f(field)} BETWEEN ${this.cb.v(first)} AND ${this.cb.v(last)}`;
|