@malloydata/malloy 0.0.13-dev221205155228 → 0.0.13

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.
@@ -299,6 +299,7 @@ export declare class Document extends MalloyElement implements NameSpace {
299
299
  queryList: model.Query[];
300
300
  sqlBlocks: model.SQLBlockStructDef[];
301
301
  statements: RunList;
302
+ didInitModel: boolean;
302
303
  constructor(statements: DocStatement[]);
303
304
  initModelDef(extendingModelDef: model.ModelDef | undefined): void;
304
305
  compile(): DocumentCompileResult;
@@ -1408,10 +1408,14 @@ class Document extends MalloyElement {
1408
1408
  this.documentModel = {};
1409
1409
  this.queryList = [];
1410
1410
  this.sqlBlocks = [];
1411
+ this.didInitModel = false;
1411
1412
  this.statements = new RunList("topLevelStatements", statements);
1412
1413
  this.has({ statements });
1413
1414
  }
1414
1415
  initModelDef(extendingModelDef) {
1416
+ if (this.didInitModel) {
1417
+ return;
1418
+ }
1415
1419
  this.documentModel = {};
1416
1420
  this.queryList = [];
1417
1421
  this.sqlBlocks = [];
@@ -1424,6 +1428,7 @@ class Document extends MalloyElement {
1424
1428
  }
1425
1429
  }
1426
1430
  }
1431
+ this.didInitModel = true;
1427
1432
  }
1428
1433
  compile() {
1429
1434
  const needs = this.statements.executeList(this);