@malloydata/malloy 0.0.112-dev231206194739 → 0.0.112-dev231207161601
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/dist/malloy.d.ts +1 -0
- package/dist/malloy.js +9 -0
- package/dist/model/malloy_query.js +1 -1
- package/package.json +1 -1
package/dist/malloy.d.ts
CHANGED
|
@@ -521,6 +521,7 @@ declare abstract class Entity {
|
|
|
521
521
|
get source(): Entity | undefined;
|
|
522
522
|
get name(): string;
|
|
523
523
|
get sourceClasses(): string[];
|
|
524
|
+
get fieldPath(): string[];
|
|
524
525
|
hasParentExplore(): this is Field;
|
|
525
526
|
isExplore(): this is Explore;
|
|
526
527
|
isQuery(): this is Query;
|
package/dist/malloy.js
CHANGED
|
@@ -943,6 +943,15 @@ class Entity {
|
|
|
943
943
|
sourceClasses.push(this.name);
|
|
944
944
|
return sourceClasses;
|
|
945
945
|
}
|
|
946
|
+
get fieldPath() {
|
|
947
|
+
const path = [this.name];
|
|
948
|
+
let f = this._parent;
|
|
949
|
+
while (f) {
|
|
950
|
+
path.unshift(f.name);
|
|
951
|
+
f = f._parent;
|
|
952
|
+
}
|
|
953
|
+
return path;
|
|
954
|
+
}
|
|
946
955
|
hasParentExplore() {
|
|
947
956
|
return this._parent !== undefined;
|
|
948
957
|
}
|
|
@@ -2635,7 +2635,7 @@ class QueryQueryIndexStage extends QueryQuery {
|
|
|
2635
2635
|
s += ` WHEN ${i} THEN ${dialect.concat(`MIN(${dialect.castToString(fields[i].expression)})`, "' to '", dialect.castToString(`MAX(${fields[i].expression})`))}\n`;
|
|
2636
2636
|
}
|
|
2637
2637
|
if (fields[i].type === 'timestamp' || fields[i].type === 'date') {
|
|
2638
|
-
s += ` WHEN ${i} THEN ${dialect.concat(`MIN(${dialect.sqlDateToString(fields[i].expression)}`, "' to '", `MAX(${dialect.sqlDateToString(fields[i].expression)})`)}\n`;
|
|
2638
|
+
s += ` WHEN ${i} THEN ${dialect.concat(`MIN(${dialect.sqlDateToString(fields[i].expression)})`, "' to '", `MAX(${dialect.sqlDateToString(fields[i].expression)})`)}\n`;
|
|
2639
2639
|
}
|
|
2640
2640
|
}
|
|
2641
2641
|
s += ` END as ${fieldRangeColumn}\n`;
|