@malloydata/malloy 0.0.298 → 0.0.300
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/api/asynchronous.d.ts +1 -1
- package/dist/api/core.d.ts +1 -0
- package/dist/api/core.js +25 -15
- package/dist/api/sessioned.js +5 -1
- package/dist/dialect/functions/util.js +8 -2
- package/dist/lang/ast/error-factory.js +17 -3
- package/dist/lang/ast/expressions/constant-expression.d.ts +1 -0
- package/dist/lang/ast/expressions/constant-expression.js +3 -0
- package/dist/lang/ast/expressions/expr-props.d.ts +12 -0
- package/dist/lang/ast/field-space/dynamic-space.js +1 -1
- package/dist/lang/ast/field-space/index-field-space.d.ts +2 -1
- package/dist/lang/ast/field-space/index-field-space.js +20 -2
- package/dist/lang/ast/field-space/join-space-field.d.ts +1 -1
- package/dist/lang/ast/field-space/join-space-field.js +2 -2
- package/dist/lang/ast/field-space/parameter-space.d.ts +1 -0
- package/dist/lang/ast/field-space/parameter-space.js +3 -0
- package/dist/lang/ast/field-space/passthrough-space.d.ts +1 -0
- package/dist/lang/ast/field-space/passthrough-space.js +3 -0
- package/dist/lang/ast/field-space/query-input-space.d.ts +1 -0
- package/dist/lang/ast/field-space/query-input-space.js +3 -0
- package/dist/lang/ast/field-space/query-spaces.d.ts +13 -1
- package/dist/lang/ast/field-space/query-spaces.js +128 -29
- package/dist/lang/ast/field-space/refine-from-space-field.d.ts +9 -0
- package/dist/lang/ast/field-space/refine-from-space-field.js +24 -0
- package/dist/lang/ast/field-space/static-space.d.ts +6 -3
- package/dist/lang/ast/field-space/static-space.js +13 -10
- package/dist/lang/ast/field-space/view-field.d.ts +2 -108
- package/dist/lang/ast/field-space/view-field.js +1 -40
- package/dist/lang/ast/query-builders/reduce-builder.js +1 -0
- package/dist/lang/ast/query-elements/query-raw.js +1 -1
- package/dist/lang/ast/query-elements/query-reference.js +1 -2
- package/dist/lang/ast/query-elements/query-refine.js +5 -5
- package/dist/lang/ast/query-items/field-references.d.ts +4 -0
- package/dist/lang/ast/query-items/field-references.js +12 -1
- package/dist/lang/ast/query-properties/qop-desc.js +1 -7
- package/dist/lang/ast/source-elements/query-source.js +1 -0
- package/dist/lang/ast/source-elements/refined-source.js +2 -2
- package/dist/lang/ast/source-properties/join.js +1 -1
- package/dist/lang/ast/typedesc-utils.d.ts +0 -1
- package/dist/lang/ast/typedesc-utils.js +1 -2
- package/dist/lang/ast/types/field-space.d.ts +2 -0
- package/dist/lang/ast/types/malloy-element.js +2 -2
- package/dist/lang/ast/types/op-desc.d.ts +1 -1
- package/dist/lang/ast/types/space-field.d.ts +3 -1
- package/dist/lang/ast/types/space-field.js +22 -0
- package/dist/lang/ast/view-elements/qop-desc-view.js +8 -4
- package/dist/lang/ast/view-elements/reference-view.js +9 -7
- package/dist/lang/ast/view-elements/view-refine.js +1 -2
- package/dist/lang/test/test-translator.js +11 -0
- package/dist/malloy.js +8 -6
- package/dist/model/malloy_query.js +19 -4
- package/dist/model/malloy_types.d.ts +13 -4
- package/dist/model/malloy_types.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/dist/lang/ast/struct-utils.d.ts +0 -5
- package/dist/lang/ast/struct-utils.js +0 -69
|
@@ -10,4 +10,4 @@ export interface CompilerNeedFetch<T extends InfoConnection> {
|
|
|
10
10
|
export declare function compileModel(request: Malloy.CompileModelRequest, fetchers: CompilerNeedFetch<InfoConnection>): Promise<Malloy.CompileModelResponse>;
|
|
11
11
|
export declare function compileSource(request: Malloy.CompileSourceRequest, fetchers: CompilerNeedFetch<InfoConnection>): Promise<Malloy.CompileSourceResponse>;
|
|
12
12
|
export declare function compileQuery(request: Malloy.CompileQueryRequest, fetchers: CompilerNeedFetch<InfoConnection>): Promise<Malloy.CompileQueryResponse>;
|
|
13
|
-
export declare function runQuery(request: Malloy.
|
|
13
|
+
export declare function runQuery(request: Malloy.RunQueryRequest, fetchers: CompilerNeedFetch<Connection>): Promise<Malloy.RunQueryResponse>;
|
package/dist/api/core.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export interface CompileModelState {
|
|
|
27
27
|
translator: MalloyTranslator;
|
|
28
28
|
done: boolean;
|
|
29
29
|
hasSource: boolean;
|
|
30
|
+
excludeReferences: boolean;
|
|
30
31
|
}
|
|
31
32
|
export declare function updateCompileModelState(state: CompileModelState, needs: Malloy.CompilerNeeds | undefined): void;
|
|
32
33
|
export declare function newCompileModelState(request: Malloy.CompileModelRequest): CompileModelState;
|
package/dist/api/core.js
CHANGED
|
@@ -258,17 +258,19 @@ function updateCompileModelState(state, needs) {
|
|
|
258
258
|
const update = compilerNeedsToUpdate(needs);
|
|
259
259
|
performUpdate(state, update);
|
|
260
260
|
}
|
|
261
|
-
function _newCompileModelState(modelURL, compilerNeeds, extendURL) {
|
|
261
|
+
function _newCompileModelState(modelURL, compilerNeeds, parseUpdate, extendURL, excludeReferences = false) {
|
|
262
262
|
var _a, _b, _c, _d;
|
|
263
|
-
|
|
263
|
+
parseUpdate !== null && parseUpdate !== void 0 ? parseUpdate : (parseUpdate = compilerNeedsToUpdate(compilerNeeds));
|
|
264
|
+
const translator = new lang_1.MalloyTranslator(modelURL, null, parseUpdate);
|
|
264
265
|
const hasSource = ((_b = (_a = compilerNeeds === null || compilerNeeds === void 0 ? void 0 : compilerNeeds.files) === null || _a === void 0 ? void 0 : _a.some(f => f.url === modelURL)) !== null && _b !== void 0 ? _b : false) ||
|
|
265
266
|
((_d = (_c = compilerNeeds === null || compilerNeeds === void 0 ? void 0 : compilerNeeds.translations) === null || _c === void 0 ? void 0 : _c.some(t => t.url === modelURL)) !== null && _d !== void 0 ? _d : false);
|
|
266
267
|
if (extendURL) {
|
|
267
268
|
return {
|
|
268
|
-
extending: _newCompileModelState(extendURL, compilerNeeds),
|
|
269
|
+
extending: _newCompileModelState(extendURL, compilerNeeds, parseUpdate, undefined, excludeReferences),
|
|
269
270
|
translator,
|
|
270
271
|
done: false,
|
|
271
272
|
hasSource,
|
|
273
|
+
excludeReferences,
|
|
272
274
|
};
|
|
273
275
|
}
|
|
274
276
|
else {
|
|
@@ -276,14 +278,15 @@ function _newCompileModelState(modelURL, compilerNeeds, extendURL) {
|
|
|
276
278
|
translator,
|
|
277
279
|
done: false,
|
|
278
280
|
hasSource,
|
|
281
|
+
excludeReferences,
|
|
279
282
|
};
|
|
280
283
|
}
|
|
281
284
|
}
|
|
282
285
|
function newCompileModelState(request) {
|
|
283
|
-
return _newCompileModelState(request.model_url, request.compiler_needs, request.extend_model_url);
|
|
286
|
+
return _newCompileModelState(request.model_url, request.compiler_needs, undefined, request.extend_model_url, request.exclude_references);
|
|
284
287
|
}
|
|
285
288
|
function newCompileSourceState(request) {
|
|
286
|
-
return _newCompileModelState(request.model_url, request.compiler_needs, request.extend_model_url);
|
|
289
|
+
return _newCompileModelState(request.model_url, request.compiler_needs, undefined, request.extend_model_url, request.exclude_references);
|
|
287
290
|
}
|
|
288
291
|
// function hasNeeds(needs: Malloy.CompilerNeeds | undefined): boolean {
|
|
289
292
|
// if (needs === undefined) return false;
|
|
@@ -328,7 +331,7 @@ function _statedCompileModel(state) {
|
|
|
328
331
|
const model = (0, to_stable_1.modelDefToModelInfo)(result.modelDef);
|
|
329
332
|
return {
|
|
330
333
|
model,
|
|
331
|
-
modelDef: result.modelDef,
|
|
334
|
+
modelDef: maybeExcludeReferences(result.modelDef, state.excludeReferences),
|
|
332
335
|
timingInfo,
|
|
333
336
|
};
|
|
334
337
|
}
|
|
@@ -348,6 +351,14 @@ function _statedCompileModel(state) {
|
|
|
348
351
|
return { compilerNeeds, logs: result.problems, timingInfo };
|
|
349
352
|
}
|
|
350
353
|
}
|
|
354
|
+
function maybeExcludeReferences(modelDef, excludeReferences) {
|
|
355
|
+
if (!excludeReferences)
|
|
356
|
+
return modelDef;
|
|
357
|
+
return {
|
|
358
|
+
...modelDef,
|
|
359
|
+
references: undefined,
|
|
360
|
+
};
|
|
361
|
+
}
|
|
351
362
|
function wrapResponse(response, defaultURL) {
|
|
352
363
|
const logs = response.logs ? (0, util_1.mapLogs)(response.logs, defaultURL) : undefined;
|
|
353
364
|
if (response.compilerNeeds) {
|
|
@@ -375,10 +386,6 @@ function wrapResponse(response, defaultURL) {
|
|
|
375
386
|
};
|
|
376
387
|
}
|
|
377
388
|
}
|
|
378
|
-
function _compileModel(modelURL, compilerNeeds, extendURL, state) {
|
|
379
|
-
state !== null && state !== void 0 ? state : (state = _newCompileModelState(modelURL, compilerNeeds, extendURL));
|
|
380
|
-
return _statedCompileModel(state);
|
|
381
|
-
}
|
|
382
389
|
function compileModel(request, state) {
|
|
383
390
|
state !== null && state !== void 0 ? state : (state = newCompileModelState(request));
|
|
384
391
|
return statedCompileModel(state);
|
|
@@ -421,10 +428,13 @@ function hasErrors(log) {
|
|
|
421
428
|
return (_a = log === null || log === void 0 ? void 0 : log.some(m => m.severity === 'error')) !== null && _a !== void 0 ? _a : false;
|
|
422
429
|
}
|
|
423
430
|
function newCompileQueryState(request) {
|
|
424
|
-
var _a, _b;
|
|
425
|
-
const queryMalloy = Malloy.queryToMalloy(request.query);
|
|
431
|
+
var _a, _b, _c;
|
|
432
|
+
const queryMalloy = (_a = request.query_malloy) !== null && _a !== void 0 ? _a : (request.query ? Malloy.queryToMalloy(request.query) : undefined);
|
|
433
|
+
if (queryMalloy === undefined) {
|
|
434
|
+
throw new Error('Expected either query or query_malloy');
|
|
435
|
+
}
|
|
426
436
|
const needs = {
|
|
427
|
-
...((
|
|
437
|
+
...((_b = request.compiler_needs) !== null && _b !== void 0 ? _b : {}),
|
|
428
438
|
};
|
|
429
439
|
const queryURL = 'internal://query.malloy';
|
|
430
440
|
needs.files = [
|
|
@@ -432,10 +442,10 @@ function newCompileQueryState(request) {
|
|
|
432
442
|
url: queryURL,
|
|
433
443
|
contents: queryMalloy,
|
|
434
444
|
},
|
|
435
|
-
...((
|
|
445
|
+
...((_c = needs.files) !== null && _c !== void 0 ? _c : []),
|
|
436
446
|
];
|
|
437
447
|
return {
|
|
438
|
-
..._newCompileModelState(queryURL, needs, request.model_url),
|
|
448
|
+
..._newCompileModelState(queryURL, needs, undefined, request.model_url, request.exclude_references),
|
|
439
449
|
defaultRowLimit: request.default_row_limit,
|
|
440
450
|
};
|
|
441
451
|
}
|
package/dist/api/sessioned.js
CHANGED
|
@@ -242,7 +242,11 @@ class SessionManager {
|
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
compileQuery(request, options) {
|
|
245
|
-
|
|
245
|
+
var _a;
|
|
246
|
+
const queryString = (_a = request.query_malloy) !== null && _a !== void 0 ? _a : (request.query ? Malloy.queryToMalloy(request.query) : undefined);
|
|
247
|
+
if (queryString === undefined) {
|
|
248
|
+
throw new Error('Expected query_malloy or query');
|
|
249
|
+
}
|
|
246
250
|
const sessionInfo = {
|
|
247
251
|
type: 'compile_query',
|
|
248
252
|
modelURL: request.model_url,
|
|
@@ -233,9 +233,12 @@ function expandReturnTypeBlueprint(blueprint) {
|
|
|
233
233
|
else if ('sql_native' in blueprint) {
|
|
234
234
|
return anyExprType({ type: 'sql native', rawType: blueprint.sql_native });
|
|
235
235
|
}
|
|
236
|
-
else {
|
|
236
|
+
else if ('calculation' in blueprint) {
|
|
237
237
|
return minAnalytic(expandTypeDescElementBlueprint(blueprint.calculation, false));
|
|
238
238
|
}
|
|
239
|
+
else {
|
|
240
|
+
throw new Error('Invalid function blueprint');
|
|
241
|
+
}
|
|
239
242
|
}
|
|
240
243
|
function isTypeDescBlueprint(blueprint) {
|
|
241
244
|
return (typeof blueprint === 'string' ||
|
|
@@ -291,9 +294,12 @@ function expandParamTypeBlueprint(blueprint) {
|
|
|
291
294
|
else if ('sql_native' in blueprint) {
|
|
292
295
|
return anyExprType({ type: 'sql native', rawType: blueprint.sql_native });
|
|
293
296
|
}
|
|
294
|
-
else {
|
|
297
|
+
else if ('calculation' in blueprint) {
|
|
295
298
|
return maxAnalytic(expandTypeDescElementBlueprint(blueprint.calculation));
|
|
296
299
|
}
|
|
300
|
+
else {
|
|
301
|
+
throw new Error('Invalid function blueprint');
|
|
302
|
+
}
|
|
297
303
|
}
|
|
298
304
|
function expandParamTypeBlueprints(blueprints) {
|
|
299
305
|
return blueprints.map(blueprint => expandParamTypeBlueprint(blueprint));
|
|
@@ -61,13 +61,27 @@ class ErrorFactory {
|
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
static get reduceSegment() {
|
|
64
|
-
return {
|
|
64
|
+
return {
|
|
65
|
+
type: 'reduce',
|
|
66
|
+
queryFields: [],
|
|
67
|
+
outputStruct: ErrorFactory.structDef,
|
|
68
|
+
isRepeated: false,
|
|
69
|
+
};
|
|
65
70
|
}
|
|
66
71
|
static get projectSegment() {
|
|
67
|
-
return {
|
|
72
|
+
return {
|
|
73
|
+
type: 'project',
|
|
74
|
+
queryFields: [],
|
|
75
|
+
outputStruct: ErrorFactory.structDef,
|
|
76
|
+
isRepeated: true,
|
|
77
|
+
};
|
|
68
78
|
}
|
|
69
79
|
static get indexSegment() {
|
|
70
|
-
return {
|
|
80
|
+
return {
|
|
81
|
+
type: 'index',
|
|
82
|
+
indexFields: [],
|
|
83
|
+
outputStruct: ErrorFactory.structDef,
|
|
84
|
+
};
|
|
71
85
|
}
|
|
72
86
|
}
|
|
73
87
|
exports.ErrorFactory = ErrorFactory;
|
|
@@ -14,6 +14,7 @@ export declare class ConstantFieldSpace implements FieldSpace {
|
|
|
14
14
|
entry(): undefined;
|
|
15
15
|
dialectName(): string;
|
|
16
16
|
dialectObj(): undefined;
|
|
17
|
+
connectionName(): string;
|
|
17
18
|
isQueryFieldSpace(): this is QueryFieldSpace;
|
|
18
19
|
accessProtectionLevel(): AccessModifierLabel;
|
|
19
20
|
}
|
|
@@ -153,6 +153,18 @@ export declare class ExprProps extends ExpressionDef {
|
|
|
153
153
|
morphic?: {
|
|
154
154
|
[x: string]: import("../../../model/malloy_types").Expr;
|
|
155
155
|
};
|
|
156
|
+
} | {
|
|
157
|
+
requiresGroupBy: import("../../../model/malloy_types").RequiredGroupBy[] | undefined;
|
|
158
|
+
type: "turtle";
|
|
159
|
+
pipeline: import("../../../model/malloy_types").PipeSegment[];
|
|
160
|
+
expressionType: import("../../../model/malloy_types").ExpressionType;
|
|
161
|
+
evalSpace: import("../../../model/malloy_types").EvalSpace;
|
|
162
|
+
fieldUsage: import("../../../model/malloy_types").FieldUsage[];
|
|
163
|
+
ungroupings?: import("../../../model/malloy_types").AggregateUngrouping[];
|
|
164
|
+
value: import("../../../model/malloy_types").Expr;
|
|
165
|
+
morphic?: {
|
|
166
|
+
[x: string]: import("../../../model/malloy_types").Expr;
|
|
167
|
+
};
|
|
156
168
|
} | {
|
|
157
169
|
requiresGroupBy: import("../../../model/malloy_types").RequiredGroupBy[] | undefined;
|
|
158
170
|
type: "date";
|
|
@@ -68,7 +68,7 @@ const struct_space_field_base_1 = require("./struct-space-field-base");
|
|
|
68
68
|
const parameter_space_1 = require("./parameter-space");
|
|
69
69
|
class DynamicSpace extends static_space_1.StaticSpace {
|
|
70
70
|
constructor(extending) {
|
|
71
|
-
super(
|
|
71
|
+
super({ ...extending }, extending.dialect, extending.connection);
|
|
72
72
|
this.complete = false;
|
|
73
73
|
this.parameters = [];
|
|
74
74
|
this.newAccessModifiers = new Map();
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { IndexSegment, PipeSegment } from '../../../model/malloy_types';
|
|
1
|
+
import type { IndexSegment, PipeSegment, SourceDef } from '../../../model/malloy_types';
|
|
2
2
|
import { WildcardFieldReference } from '../query-items/field-references';
|
|
3
3
|
import type { MalloyElement } from '../types/malloy-element';
|
|
4
4
|
import { QueryOperationSpace } from './query-spaces';
|
|
5
5
|
export declare class IndexFieldSpace extends QueryOperationSpace {
|
|
6
6
|
readonly segmentType = "index";
|
|
7
7
|
pushFields(...defs: MalloyElement[]): void;
|
|
8
|
+
structDef(): SourceDef;
|
|
8
9
|
getPipeSegment(refineIndex?: PipeSegment): IndexSegment;
|
|
9
10
|
addRefineFromFields(_refineThis: never): void;
|
|
10
11
|
protected addWild(wild: WildcardFieldReference): void;
|
|
@@ -25,6 +25,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
25
25
|
exports.IndexFieldSpace = void 0;
|
|
26
26
|
const composite_source_utils_1 = require("../../../model/composite_source_utils");
|
|
27
27
|
const malloy_types_1 = require("../../../model/malloy_types");
|
|
28
|
+
const error_factory_1 = require("../error-factory");
|
|
28
29
|
const field_references_1 = require("../query-items/field-references");
|
|
29
30
|
const space_field_1 = require("../types/space-field");
|
|
30
31
|
const query_spaces_1 = require("./query-spaces");
|
|
@@ -48,11 +49,27 @@ class IndexFieldSpace extends query_spaces_1.QueryOperationSpace {
|
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
}
|
|
52
|
+
structDef() {
|
|
53
|
+
const connection = this.inputSpace().connectionName();
|
|
54
|
+
return {
|
|
55
|
+
type: 'query_result',
|
|
56
|
+
name: 'result',
|
|
57
|
+
dialect: this.dialectName(),
|
|
58
|
+
fields: [
|
|
59
|
+
{ type: 'string', name: 'fieldName' },
|
|
60
|
+
{ type: 'string', name: 'fieldPath' },
|
|
61
|
+
{ type: 'string', name: 'fieldValue' },
|
|
62
|
+
{ type: 'string', name: 'fieldType' },
|
|
63
|
+
{ type: 'number', name: 'weight', numberType: 'integer' },
|
|
64
|
+
],
|
|
65
|
+
connection,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
51
68
|
getPipeSegment(refineIndex) {
|
|
52
69
|
var _a;
|
|
53
70
|
if (refineIndex) {
|
|
54
71
|
this.logError('refinement-of-index-segment', 'index query operations cannot be refined');
|
|
55
|
-
return
|
|
72
|
+
return error_factory_1.ErrorFactory.indexSegment;
|
|
56
73
|
}
|
|
57
74
|
let fieldUsage = (0, composite_source_utils_1.emptyFieldUsage)();
|
|
58
75
|
const indexFields = [];
|
|
@@ -80,7 +97,8 @@ class IndexFieldSpace extends query_spaces_1.QueryOperationSpace {
|
|
|
80
97
|
}
|
|
81
98
|
}
|
|
82
99
|
this._fieldUsage = fieldUsage;
|
|
83
|
-
|
|
100
|
+
const outputStruct = this.structDef();
|
|
101
|
+
return { type: 'index', indexFields, outputStruct };
|
|
84
102
|
}
|
|
85
103
|
addRefineFromFields(_refineThis) { }
|
|
86
104
|
addWild(wild) {
|
|
@@ -4,5 +4,5 @@ import { StructSpaceField } from './static-space';
|
|
|
4
4
|
export declare class JoinSpaceField extends StructSpaceField {
|
|
5
5
|
readonly parameterSpace: ParameterSpace;
|
|
6
6
|
readonly join: Join;
|
|
7
|
-
constructor(parameterSpace: ParameterSpace, join: Join, forDialect: string);
|
|
7
|
+
constructor(parameterSpace: ParameterSpace, join: Join, forDialect: string, forConnection: string);
|
|
8
8
|
}
|
|
@@ -25,8 +25,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
25
25
|
exports.JoinSpaceField = void 0;
|
|
26
26
|
const static_space_1 = require("./static-space");
|
|
27
27
|
class JoinSpaceField extends static_space_1.StructSpaceField {
|
|
28
|
-
constructor(parameterSpace, join, forDialect) {
|
|
29
|
-
super(join.getStructDef(parameterSpace), forDialect);
|
|
28
|
+
constructor(parameterSpace, join, forDialect, forConnection) {
|
|
29
|
+
super(join.getStructDef(parameterSpace), forDialect, forConnection);
|
|
30
30
|
this.parameterSpace = parameterSpace;
|
|
31
31
|
this.join = join;
|
|
32
32
|
}
|
|
@@ -14,6 +14,7 @@ export declare class ParameterSpace implements FieldSpace {
|
|
|
14
14
|
lookup(symbol: FieldName[]): LookupResult;
|
|
15
15
|
entries(): [string, SpaceEntry][];
|
|
16
16
|
dialectName(): string;
|
|
17
|
+
connectionName(): string;
|
|
17
18
|
dialectObj(): Dialect | undefined;
|
|
18
19
|
isQueryFieldSpace(): this is QueryFieldSpace;
|
|
19
20
|
accessProtectionLevel(): AccessModifierLabel;
|
|
@@ -18,4 +18,5 @@ export declare class PassthroughSpace implements FieldSpace {
|
|
|
18
18
|
outputSpace(): import("./query-spaces").QueryOperationSpace;
|
|
19
19
|
inputSpace(): import("../types/field-space").SourceFieldSpace;
|
|
20
20
|
accessProtectionLevel(): AccessModifierLabel;
|
|
21
|
+
connectionName(): string;
|
|
21
22
|
}
|
|
@@ -51,6 +51,9 @@ class PassthroughSpace {
|
|
|
51
51
|
accessProtectionLevel() {
|
|
52
52
|
return this.realFS.accessProtectionLevel();
|
|
53
53
|
}
|
|
54
|
+
connectionName() {
|
|
55
|
+
return this.realFS.connectionName();
|
|
56
|
+
}
|
|
54
57
|
}
|
|
55
58
|
exports.PassthroughSpace = PassthroughSpace;
|
|
56
59
|
//# sourceMappingURL=passthrough-space.js.map
|
|
@@ -59,6 +59,9 @@ class QueryInputSpace extends refined_space_1.RefinedSpace {
|
|
|
59
59
|
accessProtectionLevel() {
|
|
60
60
|
return this._accessProtectionLevel;
|
|
61
61
|
}
|
|
62
|
+
isQueryOutputSpace() {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
62
65
|
}
|
|
63
66
|
exports.QueryInputSpace = QueryInputSpace;
|
|
64
67
|
//# sourceMappingURL=query-input-space.js.map
|
|
@@ -9,6 +9,10 @@ import type { LookupResult } from '../types/lookup-result';
|
|
|
9
9
|
import { QueryInputSpace } from './query-input-space';
|
|
10
10
|
import type { SpaceEntry } from '../types/space-entry';
|
|
11
11
|
import type { LogMessageOptions, MessageCode, MessageParameterType } from '../../parse-log';
|
|
12
|
+
type TranslatedQueryField = {
|
|
13
|
+
queryFieldDef: model.QueryFieldDef;
|
|
14
|
+
typeDesc: model.TypeDesc;
|
|
15
|
+
};
|
|
12
16
|
/**
|
|
13
17
|
* The output space of a query operation. It is not named "QueryOutputSpace"
|
|
14
18
|
* because this is the namespace of the Query which is a layer of an output and
|
|
@@ -48,21 +52,29 @@ export declare abstract class QueryOperationSpace extends RefinedSpace implement
|
|
|
48
52
|
accessProtectionLevel(): model.AccessModifierLabel;
|
|
49
53
|
inputSpace(): QueryInputSpace;
|
|
50
54
|
outputSpace(): QueryOperationSpace;
|
|
55
|
+
isQueryOutputSpace(): boolean;
|
|
51
56
|
protected addWild(wild: WildcardFieldReference): void;
|
|
52
57
|
protected addValidatedCompositeFieldUserFromEntry(name: string, entry: SpaceEntry): void;
|
|
53
58
|
addFieldUserFromFilter(filter: model.FilterCondition): void;
|
|
54
59
|
newEntry(name: string, logTo: MalloyElement, entry: SpaceEntry): void;
|
|
60
|
+
isQueryFieldSpace(): this is QueryFieldSpace;
|
|
55
61
|
}
|
|
56
62
|
export declare abstract class QuerySpace extends QueryOperationSpace {
|
|
57
63
|
addRefineFromFields(refineThis: model.PipeSegment): void;
|
|
58
64
|
pushFields(...defs: MalloyElement[]): void;
|
|
59
65
|
canContain(_typeDescResult: model.TypeDesc | undefined): boolean;
|
|
60
66
|
protected queryFieldDefs(): model.QueryFieldDef[];
|
|
67
|
+
protected getOutputFieldDef(queryFieldDef: model.QueryFieldDef, typeDesc: model.TypeDesc): model.FieldDef;
|
|
68
|
+
protected getPrimaryKey(fields: TranslatedQueryField[]): string | undefined;
|
|
69
|
+
structDef(): model.SourceDef;
|
|
70
|
+
translatedQueryFields: TranslatedQueryField[] | undefined;
|
|
71
|
+
protected translateQueryFields(): TranslatedQueryField[];
|
|
61
72
|
getQuerySegment(rf: model.QuerySegment | undefined): model.QuerySegment;
|
|
73
|
+
protected isRepeated(): boolean;
|
|
62
74
|
getPipeSegment(refineFrom: model.QuerySegment | undefined): model.PipeSegment;
|
|
63
75
|
lookup(path: FieldName[]): LookupResult;
|
|
64
|
-
isQueryFieldSpace(): this is QueryFieldSpace;
|
|
65
76
|
}
|
|
66
77
|
export declare class ReduceFieldSpace extends QuerySpace {
|
|
67
78
|
readonly segmentType = "reduce";
|
|
68
79
|
}
|
|
80
|
+
export {};
|