@narrative.io/data-collaboration-sdk-ts 2.42.0 → 2.44.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/AstParser.d.ts
CHANGED
|
@@ -48,7 +48,10 @@ export interface Deduplication {
|
|
|
48
48
|
}
|
|
49
49
|
export type ColumnRef = AttributeRef | DatasetColumnRef | RawRef;
|
|
50
50
|
export type BooleanExpression = And | Between | Equals | NotEquals | Gt | Gte | In | IsNull | Like | Lt | Lte | Not | Or;
|
|
51
|
-
export
|
|
51
|
+
export interface PlaceholderTable extends ast.NqlPlaceholder<ast.NqlAstType> {
|
|
52
|
+
join?: Join;
|
|
53
|
+
}
|
|
54
|
+
export type Table = RosettaTable | DatasetTable | RawTable | PlaceholderTable;
|
|
52
55
|
export interface RosettaTable {
|
|
53
56
|
type: "rosetta_stone";
|
|
54
57
|
as?: string;
|
package/build/nql/AstParser.js
CHANGED
|
@@ -431,10 +431,7 @@ function parseJoin(n) {
|
|
|
431
431
|
conditionType: n.condition_type,
|
|
432
432
|
joinType: n.join_type,
|
|
433
433
|
};
|
|
434
|
-
|
|
435
|
-
if (right[0].type !== "placeholder") {
|
|
436
|
-
right[0].join = join;
|
|
437
|
-
}
|
|
434
|
+
right[0].join = join;
|
|
438
435
|
return left.concat(right);
|
|
439
436
|
}
|
|
440
437
|
function parseTable(n) {
|
package/build/nql/NqlBuilder.js
CHANGED
|
@@ -122,6 +122,8 @@ function compileTableRefs(tables) {
|
|
|
122
122
|
return aliased("narrative.rosetta_stone", table.as, false);
|
|
123
123
|
case "raw_table":
|
|
124
124
|
return aliased(table.nql, table.as, false);
|
|
125
|
+
case "placeholder":
|
|
126
|
+
return compilePlaceholder(table);
|
|
125
127
|
default:
|
|
126
128
|
throw new Error("unreachable");
|
|
127
129
|
}
|
|
@@ -358,6 +360,7 @@ export function compilePlaceholder(n) {
|
|
|
358
360
|
case "boolean_literal":
|
|
359
361
|
case "timestamp_literal":
|
|
360
362
|
case "column":
|
|
363
|
+
case "table":
|
|
361
364
|
return `{{${n.identifier}}}`;
|
|
362
365
|
default:
|
|
363
366
|
throw new Error("unsupported placeholder");
|