@narrative.io/data-collaboration-sdk-ts 0.0.152 → 0.0.153
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
|
@@ -194,7 +194,7 @@ export interface Concat {
|
|
|
194
194
|
as?: string;
|
|
195
195
|
operands: Expression[];
|
|
196
196
|
}
|
|
197
|
-
export type Node = Select | Expression | Deduplication | Table | BooleanExpression | ArithmeticExpression | StringExpression | Join | AttributeRef | DatasetColumnRef | RawRef | Lit | FunctionCall | Add | Divide | Multiply | Subtract | UnaryMinus | And | Or | Not | Between | Equals | NotEquals | Lt | Lte | Gt | Gte | In | IsNull | Like | Concat;
|
|
197
|
+
export type Node = Select | Expression | Deduplication | Table | BooleanExpression | ArithmeticExpression | StringExpression | Join | AttributeRef | DatasetColumnRef | RawRef | Lit | FunctionCall | Add | Divide | Multiply | Subtract | UnaryMinus | And | Or | Not | Between | Equals | NotEquals | Lt | Lte | Gt | Gte | In | IsNull | Like | Concat | Raw;
|
|
198
198
|
export declare function parseStatement(n: ast.NqlAst): Statement | Raw;
|
|
199
199
|
export declare function parseCreateMaterializedView(n: ast.NqlCreateMaterializedView): CreateMaterializedView;
|
|
200
200
|
export declare function parseExplain(n: ast.NqlExplain): Explain | Raw;
|
package/build/nql/AstTraverse.js
CHANGED
|
@@ -17,7 +17,7 @@ function findTraversalTargets(node) {
|
|
|
17
17
|
case "like":
|
|
18
18
|
return [node.value];
|
|
19
19
|
case "not":
|
|
20
|
-
return
|
|
20
|
+
return [node.operand];
|
|
21
21
|
case "between":
|
|
22
22
|
return [node.operand, node.lower, node.upper];
|
|
23
23
|
case "=":
|
|
@@ -32,20 +32,19 @@ function findTraversalTargets(node) {
|
|
|
32
32
|
if (Array.isArray(node.values)) {
|
|
33
33
|
inTargets.push(...node.values);
|
|
34
34
|
}
|
|
35
|
+
else {
|
|
36
|
+
inTargets.push(node.values);
|
|
37
|
+
}
|
|
35
38
|
return inTargets;
|
|
36
39
|
}
|
|
37
40
|
case "deduplication":
|
|
38
41
|
return node.expressions;
|
|
39
42
|
case "select": {
|
|
40
43
|
const selectTargets = [...node.columns];
|
|
41
|
-
if (node.where !== null &&
|
|
42
|
-
node.where !== undefined &&
|
|
43
|
-
node.where.type !== "nql") {
|
|
44
|
+
if (node.where !== null && node.where !== undefined) {
|
|
44
45
|
selectTargets.push(node.where);
|
|
45
46
|
}
|
|
46
|
-
if (node.deduplication !== null &&
|
|
47
|
-
node.deduplication !== undefined &&
|
|
48
|
-
node.deduplication.type !== "nql") {
|
|
47
|
+
if (node.deduplication !== null && node.deduplication !== undefined) {
|
|
49
48
|
selectTargets.push(node.deduplication);
|
|
50
49
|
}
|
|
51
50
|
if (Array.isArray(node.from)) {
|