@narrative.io/data-collaboration-sdk-ts 0.18.0 → 0.19.0
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/nql/NqlBuilder.js +11 -1
- package/package.json +1 -1
package/build/nql/NqlBuilder.js
CHANGED
|
@@ -221,7 +221,17 @@ function compileBinaryOperator(op, operands, as) {
|
|
|
221
221
|
return aliased(`(${operands.map((e) => compileExpression(e)).join(` ${op} `)})`, as);
|
|
222
222
|
}
|
|
223
223
|
function compileDatasetColumnRef(datasetId, column, as) {
|
|
224
|
-
|
|
224
|
+
const formattedColumn = column
|
|
225
|
+
.split(".")
|
|
226
|
+
.reduce((acc, segment, index) => {
|
|
227
|
+
if (index === 0) {
|
|
228
|
+
return `${acc}${quote(segment)}`;
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
return `${acc}.${quote(segment)}`;
|
|
232
|
+
}
|
|
233
|
+
}, "");
|
|
234
|
+
return aliased(`company_data.${quote(datasetId.toString())}.${formattedColumn}`, as);
|
|
225
235
|
}
|
|
226
236
|
function compileFunctionCall(name, args, as) {
|
|
227
237
|
// Calling convenions for functions are all over the place:
|