@malloydata/malloy 0.0.81 → 0.0.82-dev230912221500
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 +5 -5
- package/dist/malloy.js +3 -3
- package/dist/model/malloy_query.d.ts +8 -8
- package/dist/model/malloy_query.js +8 -8
- package/package.json +1 -1
package/dist/malloy.d.ts
CHANGED
|
@@ -148,9 +148,9 @@ export declare class Model implements Taggable {
|
|
|
148
148
|
private modelDef;
|
|
149
149
|
private queryList;
|
|
150
150
|
private sqlBlocks;
|
|
151
|
+
readonly problems: LogMessage[];
|
|
151
152
|
_referenceAt: (location: ModelDocumentPosition) => DocumentReference | undefined;
|
|
152
153
|
_importAt: (location: ModelDocumentPosition) => ImportLocation | undefined;
|
|
153
|
-
readonly problems: LogMessage[];
|
|
154
154
|
constructor(modelDef: ModelDef, queryList: InternalQuery[], sqlBlocks: SQLBlockStructDef[], problems: LogMessage[], referenceAt?: (location: ModelDocumentPosition) => DocumentReference | undefined, importAt?: (location: ModelDocumentPosition) => ImportLocation | undefined);
|
|
155
155
|
tagParse(spec?: TagParseSpec): TagParse;
|
|
156
156
|
getTaglines(prefix?: RegExp): string[];
|
|
@@ -224,10 +224,10 @@ export declare class Model implements Taggable {
|
|
|
224
224
|
* A prepared query which has all the necessary information to produce its SQL.
|
|
225
225
|
*/
|
|
226
226
|
export declare class PreparedQuery implements Taggable {
|
|
227
|
+
name?: string | undefined;
|
|
227
228
|
_modelDef: ModelDef;
|
|
228
229
|
_query: InternalQuery | NamedQuery;
|
|
229
|
-
name?: string;
|
|
230
|
-
constructor(query: InternalQuery, model: ModelDef, name?: string);
|
|
230
|
+
constructor(query: InternalQuery, model: ModelDef, name?: string | undefined);
|
|
231
231
|
tagParse(spec?: TagParseSpec): TagParse;
|
|
232
232
|
getTaglines(prefix?: RegExp): string[];
|
|
233
233
|
/**
|
|
@@ -409,8 +409,8 @@ export declare class DocumentCompletion {
|
|
|
409
409
|
* A fully-prepared query containing SQL and metadata required to run the query.
|
|
410
410
|
*/
|
|
411
411
|
export declare class PreparedResult implements Taggable {
|
|
412
|
-
protected inner: CompiledQuery;
|
|
413
412
|
protected modelDef: ModelDef;
|
|
413
|
+
protected inner: CompiledQuery;
|
|
414
414
|
constructor(query: CompiledQuery, modelDef: ModelDef);
|
|
415
415
|
tagParse(spec?: TagParseSpec): TagParse;
|
|
416
416
|
getTaglines(prefix?: RegExp): string[];
|
|
@@ -455,7 +455,7 @@ export declare class InMemoryURLReader implements URLReader {
|
|
|
455
455
|
export declare class FixedConnectionMap implements LookupConnection<Connection> {
|
|
456
456
|
private connections;
|
|
457
457
|
private defaultConnectionName?;
|
|
458
|
-
constructor(connections: Map<string, Connection>, defaultConnectionName?: string);
|
|
458
|
+
constructor(connections: Map<string, Connection>, defaultConnectionName?: string | undefined);
|
|
459
459
|
/**
|
|
460
460
|
* Get a connection by name.
|
|
461
461
|
*
|
package/dist/malloy.js
CHANGED
|
@@ -322,9 +322,9 @@ class Model {
|
|
|
322
322
|
this.modelDef = modelDef;
|
|
323
323
|
this.queryList = queryList;
|
|
324
324
|
this.sqlBlocks = sqlBlocks;
|
|
325
|
+
this.problems = problems;
|
|
325
326
|
this._referenceAt = referenceAt;
|
|
326
327
|
this._importAt = importAt;
|
|
327
|
-
this.problems = problems;
|
|
328
328
|
}
|
|
329
329
|
tagParse(spec) {
|
|
330
330
|
return tags_1.Tag.annotationToTag(this.modelDef.annotation, spec);
|
|
@@ -458,9 +458,9 @@ exports.Model = Model;
|
|
|
458
458
|
*/
|
|
459
459
|
class PreparedQuery {
|
|
460
460
|
constructor(query, model, name) {
|
|
461
|
+
this.name = name;
|
|
461
462
|
this._query = query;
|
|
462
463
|
this._modelDef = model;
|
|
463
|
-
this.name = name;
|
|
464
464
|
}
|
|
465
465
|
tagParse(spec) {
|
|
466
466
|
const modelScope = tags_1.Tag.annotationToTag(this._modelDef.annotation).tag;
|
|
@@ -707,8 +707,8 @@ exports.DocumentCompletion = DocumentCompletion;
|
|
|
707
707
|
*/
|
|
708
708
|
class PreparedResult {
|
|
709
709
|
constructor(query, modelDef) {
|
|
710
|
-
this.inner = query;
|
|
711
710
|
this.modelDef = modelDef;
|
|
711
|
+
this.inner = query;
|
|
712
712
|
}
|
|
713
713
|
tagParse(spec) {
|
|
714
714
|
const modelScope = tags_1.Tag.annotationToTag(this.modelDef.annotation).tag;
|
|
@@ -18,11 +18,11 @@ interface OutputPipelinedSQL {
|
|
|
18
18
|
pipelineSQL: string;
|
|
19
19
|
}
|
|
20
20
|
declare class StageWriter {
|
|
21
|
+
parent: StageWriter | undefined;
|
|
21
22
|
withs: string[];
|
|
22
23
|
udfs: string[];
|
|
23
24
|
pdts: string[];
|
|
24
25
|
stagePrefix: string;
|
|
25
|
-
parent: StageWriter | undefined;
|
|
26
26
|
useCTE: boolean;
|
|
27
27
|
constructor(useCTE: boolean | undefined, parent: StageWriter | undefined);
|
|
28
28
|
getName(id: number): string;
|
|
@@ -113,11 +113,11 @@ interface FieldInstance {
|
|
|
113
113
|
root(): FieldInstanceResultRoot;
|
|
114
114
|
}
|
|
115
115
|
declare class FieldInstanceField implements FieldInstance {
|
|
116
|
-
type: FieldInstanceType;
|
|
117
116
|
f: QueryField;
|
|
118
117
|
fieldUsage: FieldUsage;
|
|
119
|
-
additionalGroupSets: number[];
|
|
120
118
|
parent: FieldInstanceResult;
|
|
119
|
+
type: FieldInstanceType;
|
|
120
|
+
additionalGroupSets: number[];
|
|
121
121
|
analyticalSQL: string | undefined;
|
|
122
122
|
partitionSQL: string | undefined;
|
|
123
123
|
constructor(f: QueryField, fieldUsage: FieldUsage, parent: FieldInstanceResult);
|
|
@@ -132,13 +132,13 @@ type UngroupSet = {
|
|
|
132
132
|
groupSet: number;
|
|
133
133
|
};
|
|
134
134
|
declare class FieldInstanceResult implements FieldInstance {
|
|
135
|
+
turtleDef: TurtleDef;
|
|
136
|
+
parent: FieldInstanceResult | undefined;
|
|
135
137
|
type: FieldInstanceType;
|
|
136
138
|
allFields: Map<string, FieldInstance>;
|
|
137
139
|
groupSet: number;
|
|
138
140
|
depth: number;
|
|
139
|
-
parent: FieldInstanceResult | undefined;
|
|
140
141
|
childGroups: number[];
|
|
141
|
-
turtleDef: TurtleDef;
|
|
142
142
|
firstSegment: PipeSegment;
|
|
143
143
|
hasHaving: boolean;
|
|
144
144
|
ungroupedSets: Map<string, UngroupSet>;
|
|
@@ -185,13 +185,13 @@ declare class FieldInstanceResultRoot extends FieldInstanceResult {
|
|
|
185
185
|
calculateSymmetricAggregates(): void;
|
|
186
186
|
}
|
|
187
187
|
declare class JoinInstance {
|
|
188
|
+
queryStruct: QueryStruct;
|
|
189
|
+
alias: string;
|
|
190
|
+
parent: JoinInstance | undefined;
|
|
188
191
|
mayNeedUniqueKey: boolean;
|
|
189
192
|
makeUniqueKey: boolean;
|
|
190
193
|
leafiest: boolean;
|
|
191
|
-
parent: JoinInstance | undefined;
|
|
192
|
-
queryStruct: QueryStruct;
|
|
193
194
|
joinFilterConditions?: QueryFieldBoolean[];
|
|
194
|
-
alias: string;
|
|
195
195
|
children: JoinInstance[];
|
|
196
196
|
constructor(queryStruct: QueryStruct, alias: string, parent: JoinInstance | undefined);
|
|
197
197
|
parentRelationship(): 'root' | JoinRelationship;
|
|
@@ -40,11 +40,11 @@ function identifierNormalize(s) {
|
|
|
40
40
|
}
|
|
41
41
|
class StageWriter {
|
|
42
42
|
constructor(useCTE = true, parent) {
|
|
43
|
+
this.parent = parent;
|
|
43
44
|
this.withs = [];
|
|
44
45
|
this.udfs = [];
|
|
45
46
|
this.pdts = [];
|
|
46
47
|
this.stagePrefix = '__stage';
|
|
47
|
-
this.parent = parent;
|
|
48
48
|
this.useCTE = useCTE;
|
|
49
49
|
}
|
|
50
50
|
getName(id) {
|
|
@@ -777,11 +777,11 @@ function sqlSumDistinct(dialect, sqlExp, sqlDistintKey) {
|
|
|
777
777
|
}
|
|
778
778
|
class FieldInstanceField {
|
|
779
779
|
constructor(f, fieldUsage, parent) {
|
|
780
|
-
this.type = 'field';
|
|
781
|
-
this.additionalGroupSets = [];
|
|
782
780
|
this.f = f;
|
|
783
781
|
this.fieldUsage = fieldUsage;
|
|
784
782
|
this.parent = parent;
|
|
783
|
+
this.type = 'field';
|
|
784
|
+
this.additionalGroupSets = [];
|
|
785
785
|
}
|
|
786
786
|
root() {
|
|
787
787
|
return this.parent.root();
|
|
@@ -809,6 +809,8 @@ class FieldInstanceField {
|
|
|
809
809
|
}
|
|
810
810
|
class FieldInstanceResult {
|
|
811
811
|
constructor(turtleDef, parent) {
|
|
812
|
+
this.turtleDef = turtleDef;
|
|
813
|
+
this.parent = parent;
|
|
812
814
|
this.type = 'query';
|
|
813
815
|
this.allFields = new Map();
|
|
814
816
|
this.groupSet = 0;
|
|
@@ -818,8 +820,6 @@ class FieldInstanceResult {
|
|
|
818
820
|
this.ungroupedSets = new Map();
|
|
819
821
|
// query: QueryQuery;
|
|
820
822
|
this.resultUsesUngrouped = false;
|
|
821
|
-
this.parent = parent;
|
|
822
|
-
this.turtleDef = turtleDef;
|
|
823
823
|
this.firstSegment = turtleDef.pipeline[0];
|
|
824
824
|
}
|
|
825
825
|
getQueryInfo() {
|
|
@@ -1185,13 +1185,13 @@ class FieldInstanceResultRoot extends FieldInstanceResult {
|
|
|
1185
1185
|
}
|
|
1186
1186
|
class JoinInstance {
|
|
1187
1187
|
constructor(queryStruct, alias, parent) {
|
|
1188
|
+
this.queryStruct = queryStruct;
|
|
1189
|
+
this.alias = alias;
|
|
1190
|
+
this.parent = parent;
|
|
1188
1191
|
this.mayNeedUniqueKey = false;
|
|
1189
1192
|
this.makeUniqueKey = false;
|
|
1190
1193
|
this.leafiest = false;
|
|
1191
1194
|
this.children = [];
|
|
1192
|
-
this.queryStruct = queryStruct;
|
|
1193
|
-
this.parent = parent;
|
|
1194
|
-
this.alias = alias;
|
|
1195
1195
|
if (parent) {
|
|
1196
1196
|
parent.children.push(this);
|
|
1197
1197
|
}
|