@narrative.io/data-collaboration-sdk-ts 0.0.154 → 0.0.156
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 +12 -3
- package/package.json +2 -2
package/build/nql/NqlBuilder.js
CHANGED
|
@@ -31,11 +31,11 @@ export function compileBudget(budget) {
|
|
|
31
31
|
let period;
|
|
32
32
|
switch (budget.period.type) {
|
|
33
33
|
case "calendar_daily": {
|
|
34
|
-
period = "PER
|
|
34
|
+
period = "PER CALENDAR_DAY";
|
|
35
35
|
break;
|
|
36
36
|
}
|
|
37
37
|
case "calendar_monthly": {
|
|
38
|
-
period = "PER
|
|
38
|
+
period = "PER CALENDAR_MONTH";
|
|
39
39
|
break;
|
|
40
40
|
}
|
|
41
41
|
default:
|
|
@@ -200,7 +200,16 @@ export function compileExpression(n) {
|
|
|
200
200
|
return unreachable(n);
|
|
201
201
|
}
|
|
202
202
|
function compileAttributeRef(column, as) {
|
|
203
|
-
|
|
203
|
+
const segments = column.split(".");
|
|
204
|
+
const quotedSegments = segments.reduce((acc, segment, index) => {
|
|
205
|
+
if (index === 0) {
|
|
206
|
+
return `${acc}${quote(segment)}`;
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
return `${acc}.${quote(segment)}`;
|
|
210
|
+
}
|
|
211
|
+
}, "");
|
|
212
|
+
return aliased(`narrative.rosetta_stone.${quotedSegments}`, as);
|
|
204
213
|
}
|
|
205
214
|
function compileBetween(operand, lower, upper, as) {
|
|
206
215
|
const operandNql = compileExpression(operand);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narrative.io/data-collaboration-sdk-ts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.156",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"repository": "github:narrative-io/data-collaboration-sdk-ts",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@types/jest": "^29.5.0",
|
|
29
29
|
"babel-jest": "^29.4.3",
|
|
30
30
|
"eslint-config-prettier": "^9.0.0",
|
|
31
|
-
"eslint-config-standard-with-typescript": "^
|
|
31
|
+
"eslint-config-standard-with-typescript": "^40.0.0",
|
|
32
32
|
"eslint-plugin-prettier": "^5.0.0",
|
|
33
33
|
"husky": "^8.0.0",
|
|
34
34
|
"jest": "^29.4.3",
|