@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.
@@ -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
- return aliased(`company_data.${quote(datasetId.toString())}.${quote(column)}`, as);
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:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narrative.io/data-collaboration-sdk-ts",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "main": "build/index.js",
5
5
  "repository": "github:narrative-io/data-collaboration-sdk-ts",
6
6
  "source": "src/index.ts",