@514labs/moose-lib 0.6.297-ci-22-g1be0de24 → 0.6.297-ci-23-g751e4221
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/{browserCompatible-CkQfVyoI.d.mts → browserCompatible-CkJwv4dC.d.mts} +1 -1
- package/dist/{browserCompatible-CprLtYmW.d.ts → browserCompatible-Dqfdy6x5.d.ts} +1 -1
- package/dist/browserCompatible.d.mts +2 -2
- package/dist/browserCompatible.d.ts +2 -2
- package/dist/browserCompatible.js +22 -9
- package/dist/browserCompatible.js.map +1 -1
- package/dist/browserCompatible.mjs +22 -9
- package/dist/browserCompatible.mjs.map +1 -1
- package/dist/dmv2/index.d.mts +1 -1
- package/dist/dmv2/index.d.ts +1 -1
- package/dist/dmv2/index.js +22 -9
- package/dist/dmv2/index.js.map +1 -1
- package/dist/dmv2/index.mjs +22 -9
- package/dist/dmv2/index.mjs.map +1 -1
- package/dist/{index-9XL-mk89.d.mts → index-CdKEq7FH.d.mts} +16 -5
- package/dist/{index-9XL-mk89.d.ts → index-CdKEq7FH.d.ts} +16 -5
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +22 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -9
- package/dist/index.mjs.map +1 -1
- package/dist/moose-runner.js +2 -2
- package/dist/moose-runner.js.map +1 -1
- package/dist/moose-runner.mjs +2 -2
- package/dist/moose-runner.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2562,8 +2562,8 @@ var init_materializedView = __esm({
|
|
|
2562
2562
|
selectSql;
|
|
2563
2563
|
/** Names of source tables that the SELECT reads from */
|
|
2564
2564
|
sourceTables;
|
|
2565
|
-
/**
|
|
2566
|
-
|
|
2565
|
+
/** Optional metadata for the materialized view */
|
|
2566
|
+
metadata;
|
|
2567
2567
|
constructor(options, targetSchema, targetColumns) {
|
|
2568
2568
|
let selectStatement = options.selectStatement;
|
|
2569
2569
|
if (typeof selectStatement !== "string") {
|
|
@@ -2594,8 +2594,14 @@ var init_materializedView = __esm({
|
|
|
2594
2594
|
this.targetTable = targetTable;
|
|
2595
2595
|
this.selectSql = selectStatement;
|
|
2596
2596
|
this.sourceTables = options.selectTables.map((t) => t.name);
|
|
2597
|
-
|
|
2598
|
-
this.
|
|
2597
|
+
this.metadata = options.metadata ? { ...options.metadata } : {};
|
|
2598
|
+
if (!this.metadata.source) {
|
|
2599
|
+
const stack = new Error().stack;
|
|
2600
|
+
const sourceInfo = getSourceFileFromStack(stack);
|
|
2601
|
+
if (sourceInfo) {
|
|
2602
|
+
this.metadata.source = { file: sourceInfo };
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2599
2605
|
const materializedViews = getMooseInternal().materializedViews;
|
|
2600
2606
|
if (!isClientOnlyMode() && materializedViews.has(this.name)) {
|
|
2601
2607
|
throw new Error(`MaterializedView with name ${this.name} already exists`);
|
|
@@ -2686,23 +2692,30 @@ var init_view = __esm({
|
|
|
2686
2692
|
selectSql;
|
|
2687
2693
|
/** Names of source tables/views that the SELECT reads from */
|
|
2688
2694
|
sourceTables;
|
|
2689
|
-
/**
|
|
2690
|
-
|
|
2695
|
+
/** Optional metadata for the view */
|
|
2696
|
+
metadata;
|
|
2691
2697
|
/**
|
|
2692
2698
|
* Creates a new View instance.
|
|
2693
2699
|
* @param name The name of the view to be created.
|
|
2694
2700
|
* @param selectStatement The SQL SELECT statement that defines the view's logic.
|
|
2695
2701
|
* @param baseTables An array of OlapTable or View objects that the `selectStatement` reads from. Used for dependency tracking.
|
|
2702
|
+
* @param metadata Optional metadata for the view (e.g., description, source file).
|
|
2696
2703
|
*/
|
|
2697
|
-
constructor(name, selectStatement, baseTables) {
|
|
2704
|
+
constructor(name, selectStatement, baseTables, metadata) {
|
|
2698
2705
|
if (typeof selectStatement !== "string") {
|
|
2699
2706
|
selectStatement = toStaticQuery(selectStatement);
|
|
2700
2707
|
}
|
|
2701
2708
|
this.name = name;
|
|
2702
2709
|
this.selectSql = selectStatement;
|
|
2703
2710
|
this.sourceTables = baseTables.map((t) => t.name);
|
|
2704
|
-
|
|
2705
|
-
this.
|
|
2711
|
+
this.metadata = metadata ? { ...metadata } : {};
|
|
2712
|
+
if (!this.metadata.source) {
|
|
2713
|
+
const stack = new Error().stack;
|
|
2714
|
+
const sourceInfo = getSourceFileFromStack(stack);
|
|
2715
|
+
if (sourceInfo) {
|
|
2716
|
+
this.metadata.source = { file: sourceInfo };
|
|
2717
|
+
}
|
|
2718
|
+
}
|
|
2706
2719
|
const customViews = getMooseInternal().customViews;
|
|
2707
2720
|
if (!isClientOnlyMode() && customViews.has(this.name)) {
|
|
2708
2721
|
throw new Error(`View with name ${this.name} already exists`);
|