@narrative.io/data-collaboration-sdk-ts 0.0.71 → 0.0.73
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.
|
@@ -162,7 +162,7 @@ function updateFieldsArray(field, fieldsArray, filterExpression) {
|
|
|
162
162
|
* @returns {string} - Returns a string representation of the unary filter expression.
|
|
163
163
|
*/
|
|
164
164
|
function constructUnaryFilterExpression(filter) {
|
|
165
|
-
return `${filter.field.field} ${filter.operator}`;
|
|
165
|
+
return `${expressionToString(filter.field.field)} ${filter.operator}`;
|
|
166
166
|
}
|
|
167
167
|
/**
|
|
168
168
|
* Constructs a string representing a binary filter expression.
|
package/build/nql/NQLParser.js
CHANGED
|
@@ -91,7 +91,9 @@ function parseFieldFromString(fieldStr) {
|
|
|
91
91
|
database,
|
|
92
92
|
table
|
|
93
93
|
},
|
|
94
|
-
field: f.
|
|
94
|
+
field: f.map((field) => {
|
|
95
|
+
return field.replace('"value"', 'value').replace('"type"', 'type');
|
|
96
|
+
}).join('.')
|
|
95
97
|
};
|
|
96
98
|
try {
|
|
97
99
|
return NqlFieldObj.parse(field);
|
|
@@ -141,7 +143,7 @@ export function getFilterExpressionFromString(str) {
|
|
|
141
143
|
right
|
|
142
144
|
});
|
|
143
145
|
}
|
|
144
|
-
const strComparison = [' NOT IN ', ' IN ', ' NOT LIKE ', ' LIKE '];
|
|
146
|
+
const strComparison = [' NOT IN ', ' IN ', ' NOT LIKE ', ' LIKE ', ' BETWEEN '];
|
|
145
147
|
const containsStrComparison = strComparison.find((character) => str.toLowerCase().includes(character.toLowerCase()));
|
|
146
148
|
if (containsStrComparison !== undefined) {
|
|
147
149
|
const result = str.toLowerCase().split(containsStrComparison.toLowerCase());
|