@malloydata/malloy 0.0.22-dev230208210335 → 0.0.22
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.
|
@@ -21,9 +21,12 @@
|
|
|
21
21
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
22
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
24
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
28
|
exports.RefinedSource = void 0;
|
|
26
|
-
const
|
|
29
|
+
const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
27
30
|
const malloy_types_1 = require("../../../model/malloy_types");
|
|
28
31
|
const refined_space_1 = require("../field-space/refined-space");
|
|
29
32
|
const declare_fields_1 = require("../query-properties/declare-fields");
|
|
@@ -81,7 +84,7 @@ class RefinedSource extends source_1.Source {
|
|
|
81
84
|
errTo.log(`Unexpected explore property: '${errTo.elementType}'`);
|
|
82
85
|
}
|
|
83
86
|
}
|
|
84
|
-
const from = (0,
|
|
87
|
+
const from = (0, cloneDeep_1.default)(this.source.structDef());
|
|
85
88
|
if (primaryKey) {
|
|
86
89
|
from.primaryKey = primaryKey.field.name;
|
|
87
90
|
}
|
|
@@ -21,9 +21,12 @@
|
|
|
21
21
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
22
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
24
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
28
|
exports.DynamicSpace = void 0;
|
|
26
|
-
const
|
|
29
|
+
const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
27
30
|
const field_utils_1 = require("../../field-utils");
|
|
28
31
|
const error_factory_1 = require("../error-factory");
|
|
29
32
|
const space_field_1 = require("../types/space-field");
|
|
@@ -36,7 +39,7 @@ const struct_space_field_base_1 = require("./struct-space-field-base");
|
|
|
36
39
|
class DynamicSpace extends static_space_1.StaticSpace {
|
|
37
40
|
constructor(extending) {
|
|
38
41
|
const source = new space_seed_1.SpaceSeed(extending);
|
|
39
|
-
super((0,
|
|
42
|
+
super((0, cloneDeep_1.default)(source.structDef));
|
|
40
43
|
this.completions = [];
|
|
41
44
|
this.complete = false;
|
|
42
45
|
this.final = undefined;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.Document = exports.RunList = exports.ListOf = exports.isDocStatement = exports.ModelEntryReference = exports.Unimplemented = exports.MalloyElement = void 0;
|
|
4
7
|
/*
|
|
@@ -23,7 +26,7 @@ exports.Document = exports.RunList = exports.ListOf = exports.isDocStatement = e
|
|
|
23
26
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
24
27
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
28
|
*/
|
|
26
|
-
const
|
|
29
|
+
const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
27
30
|
const malloy_types_1 = require("../../../model/malloy_types");
|
|
28
31
|
class MalloyElement {
|
|
29
32
|
/**
|
|
@@ -370,7 +373,7 @@ class Document extends MalloyElement {
|
|
|
370
373
|
if (this.documentModel[entry].exported) {
|
|
371
374
|
def.exports.push(entry);
|
|
372
375
|
}
|
|
373
|
-
def.contents[entry] = (0,
|
|
376
|
+
def.contents[entry] = (0, cloneDeep_1.default)(entryDef);
|
|
374
377
|
}
|
|
375
378
|
}
|
|
376
379
|
return def;
|
|
@@ -22,13 +22,16 @@
|
|
|
22
22
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
23
23
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
25
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
29
|
const model_1 = require("../../model");
|
|
27
30
|
const sql_block_1 = require("../../model/sql_block");
|
|
28
31
|
const static_space_1 = require("../ast/field-space/static-space");
|
|
29
32
|
const expression_def_1 = require("../ast/types/expression-def");
|
|
30
33
|
const test_translator_1 = require("./test-translator");
|
|
31
|
-
const
|
|
34
|
+
const isEqual_1 = __importDefault(require("lodash/isEqual"));
|
|
32
35
|
const util_1 = require("util");
|
|
33
36
|
const inspectCompile = false;
|
|
34
37
|
/*
|
|
@@ -349,7 +352,7 @@ function badModel(s, msg) {
|
|
|
349
352
|
fail(`Received errror: ${firstError.message}\n${emsg}`);
|
|
350
353
|
}
|
|
351
354
|
if (typeof s != "string") {
|
|
352
|
-
if (!(0,
|
|
355
|
+
if (!(0, isEqual_1.default)(errList[0].at, s.locations[0])) {
|
|
353
356
|
fail(`Expected location: ${s.locations[0]}\n` +
|
|
354
357
|
`Received location: ${errList[0].at}\n${emsg}`);
|
|
355
358
|
}
|
|
@@ -21,9 +21,12 @@
|
|
|
21
21
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
22
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
24
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
28
|
exports.flattenQuery = exports.QueryModel = exports.Segment = void 0;
|
|
26
|
-
const
|
|
29
|
+
const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
27
30
|
const dialect_1 = require("../dialect");
|
|
28
31
|
const standardsql_1 = require("../dialect/standardsql");
|
|
29
32
|
const malloy_types_1 = require("./malloy_types");
|
|
@@ -1184,7 +1187,7 @@ class QueryQuery extends QueryField {
|
|
|
1184
1187
|
// measures
|
|
1185
1188
|
// let e: Expr;
|
|
1186
1189
|
if (field instanceof QueryQuery) {
|
|
1187
|
-
const newFieldDef = (0,
|
|
1190
|
+
const newFieldDef = (0, cloneDeep_1.default)(field.fieldDef);
|
|
1188
1191
|
newFieldDef.as = f.name;
|
|
1189
1192
|
newFieldDef.filterList = f.filterList;
|
|
1190
1193
|
field = QueryQuery.makeQuery(newFieldDef, this.parent);
|
|
@@ -2957,7 +2960,7 @@ class QueryStruct extends QueryNode {
|
|
|
2957
2960
|
}
|
|
2958
2961
|
}
|
|
2959
2962
|
const addedFilters = turtleDef.filterList || [];
|
|
2960
|
-
pipeline = (0,
|
|
2963
|
+
pipeline = (0, cloneDeep_1.default)(pipeline);
|
|
2961
2964
|
pipeline[0].filterList = addedFilters.concat(pipeline[0].filterList || [], this.fieldDef.filterList || []);
|
|
2962
2965
|
const flatTurtleDef = {
|
|
2963
2966
|
"type": "turtle",
|