@memberjunction/codegen-lib 6.2.0-edge.6 → 6.2.0-edge.8
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/README.md +1 -0
- package/dist/Angular/angular-codegen.d.ts +12 -1
- package/dist/Angular/angular-codegen.d.ts.map +1 -1
- package/dist/Angular/angular-codegen.js +36 -1
- package/dist/Angular/angular-codegen.js.map +1 -1
- package/dist/Config/config.d.ts +175 -0
- package/dist/Config/config.d.ts.map +1 -1
- package/dist/Config/config.js +142 -84
- package/dist/Config/config.js.map +1 -1
- package/dist/Database/codeGenDatabaseProvider.d.ts +14 -0
- package/dist/Database/codeGenDatabaseProvider.d.ts.map +1 -1
- package/dist/Database/codeGenDatabaseProvider.js +37 -3
- package/dist/Database/codeGenDatabaseProvider.js.map +1 -1
- package/dist/Database/manage-metadata.d.ts +258 -18
- package/dist/Database/manage-metadata.d.ts.map +1 -1
- package/dist/Database/manage-metadata.js +683 -179
- package/dist/Database/manage-metadata.js.map +1 -1
- package/dist/Database/materializationAnalysis.d.ts +18 -4
- package/dist/Database/materializationAnalysis.d.ts.map +1 -1
- package/dist/Database/materializationAnalysis.js +113 -99
- package/dist/Database/materializationAnalysis.js.map +1 -1
- package/dist/Database/materializationBroadRender.d.ts +7 -3
- package/dist/Database/materializationBroadRender.d.ts.map +1 -1
- package/dist/Database/materializationBroadRender.js +89 -56
- package/dist/Database/materializationBroadRender.js.map +1 -1
- package/dist/Database/materializationParamClassifier.d.ts +1 -1
- package/dist/Database/materializationParamClassifier.js +2 -2
- package/dist/Database/materializationParamVerifier.d.ts +1 -1
- package/dist/Database/materializationParamVerifier.d.ts.map +1 -1
- package/dist/Database/materializationParamVerifier.js +127 -221
- package/dist/Database/materializationParamVerifier.js.map +1 -1
- package/dist/Database/materializationSqlAst.d.ts +107 -79
- package/dist/Database/materializationSqlAst.d.ts.map +1 -1
- package/dist/Database/materializationSqlAst.js +307 -134
- package/dist/Database/materializationSqlAst.js.map +1 -1
- package/dist/Database/providers/postgresql/__tests__/MetadataSupportObjectsDDL.test.js +9 -5
- package/dist/Database/providers/postgresql/__tests__/MetadataSupportObjectsDDL.test.js.map +1 -1
- package/dist/Database/providers/postgresql/metadataSupportObjects.js +244 -84
- package/dist/Database/providers/postgresql/metadataSupportObjects.js.map +1 -1
- package/dist/Database/providers/sqlserver/SQLServerCodeGenProvider.d.ts +8 -0
- package/dist/Database/providers/sqlserver/SQLServerCodeGenProvider.d.ts.map +1 -1
- package/dist/Database/providers/sqlserver/SQLServerCodeGenProvider.js +19 -1
- package/dist/Database/providers/sqlserver/SQLServerCodeGenProvider.js.map +1 -1
- package/dist/Database/providers/sqlserver/__tests__/VerifiedJoinIndexes.test.js +66 -0
- package/dist/Database/providers/sqlserver/__tests__/VerifiedJoinIndexes.test.js.map +1 -1
- package/dist/Database/queryRebindPass.d.ts +37 -0
- package/dist/Database/queryRebindPass.d.ts.map +1 -0
- package/dist/Database/queryRebindPass.js +110 -0
- package/dist/Database/queryRebindPass.js.map +1 -0
- package/dist/Database/schema-scope.d.ts +12 -0
- package/dist/Database/schema-scope.d.ts.map +1 -1
- package/dist/Database/schema-scope.js +15 -0
- package/dist/Database/schema-scope.js.map +1 -1
- package/dist/Database/sql_codegen.d.ts +74 -2
- package/dist/Database/sql_codegen.d.ts.map +1 -1
- package/dist/Database/sql_codegen.js +181 -20
- package/dist/Database/sql_codegen.js.map +1 -1
- package/dist/Misc/advanced_generation.d.ts +129 -5
- package/dist/Misc/advanced_generation.d.ts.map +1 -1
- package/dist/Misc/advanced_generation.js +212 -8
- package/dist/Misc/advanced_generation.js.map +1 -1
- package/dist/Misc/display-name-heuristics.d.ts +57 -0
- package/dist/Misc/display-name-heuristics.d.ts.map +1 -0
- package/dist/Misc/display-name-heuristics.js +97 -0
- package/dist/Misc/display-name-heuristics.js.map +1 -0
- package/dist/Misc/entity_subclasses_codegen.d.ts +31 -3
- package/dist/Misc/entity_subclasses_codegen.d.ts.map +1 -1
- package/dist/Misc/entity_subclasses_codegen.js +79 -17
- package/dist/Misc/entity_subclasses_codegen.js.map +1 -1
- package/dist/Misc/remote_operations_codegen.d.ts.map +1 -1
- package/dist/Misc/remote_operations_codegen.js +21 -4
- package/dist/Misc/remote_operations_codegen.js.map +1 -1
- package/dist/Misc/sql_logging.d.ts +12 -0
- package/dist/Misc/sql_logging.d.ts.map +1 -1
- package/dist/Misc/sql_logging.js +21 -8
- package/dist/Misc/sql_logging.js.map +1 -1
- package/dist/Misc/validator-text.d.ts +17 -0
- package/dist/Misc/validator-text.d.ts.map +1 -1
- package/dist/Misc/validator-text.js +59 -0
- package/dist/Misc/validator-text.js.map +1 -1
- package/dist/runCodeGen.d.ts +16 -0
- package/dist/runCodeGen.d.ts.map +1 -1
- package/dist/runCodeGen.js +47 -7
- package/dist/runCodeGen.js.map +1 -1
- package/package.json +29 -29
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EntityInfo, EntityFieldInfo, EntityAlternateBaseViewInfo, UserInfo } from '@memberjunction/core';
|
|
2
2
|
import { SQLUtilityBase } from './sql.js';
|
|
3
3
|
import { CodeGenDatabaseProvider, CodeGenConnection, PhasedExecutionResult } from './codeGenDatabaseProvider.js';
|
|
4
|
-
import { ViewRegenEntry } from './manage-metadata.js';
|
|
4
|
+
import { ManageMetadataBase, ViewRegenEntry } from './manage-metadata.js';
|
|
5
5
|
export declare const SPType: {
|
|
6
6
|
readonly Create: "Create";
|
|
7
7
|
readonly Update: "Update";
|
|
@@ -20,6 +20,44 @@ export declare function EntitiesNotInExcludedSchemas<T extends {
|
|
|
20
20
|
export declare function entitiesNotInExcludedSchemas<T extends {
|
|
21
21
|
SchemaName: string;
|
|
22
22
|
}>(entities: T[], excludeSchemas: string[]): T[];
|
|
23
|
+
/** One parent column an IS-A child's base view selects from a parent's base table. */
|
|
24
|
+
export interface InheritedParentColumn {
|
|
25
|
+
/** The join alias of the parent's base table in the child's view (`__mj_isa_p1` is the direct parent). */
|
|
26
|
+
Alias: string;
|
|
27
|
+
/** The parent entity whose base table holds the column. */
|
|
28
|
+
Parent: EntityInfo;
|
|
29
|
+
/** The parent's field. */
|
|
30
|
+
Field: EntityFieldInfo;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The parent columns an IS-A child's generated base view selects, in parent-chain order and each
|
|
34
|
+
* parent's field order. The child's view joins each parent's BASE TABLE, so a column qualifies only
|
|
35
|
+
* if it is physically on that table:
|
|
36
|
+
* - primary keys are shared with the child and `__mj_` columns are the child's own;
|
|
37
|
+
* - a view-only virtual field (`IsVirtual` and not `IsComputed`) is not on the table and is skipped;
|
|
38
|
+
* - a computed column (`IsVirtual` and `IsComputed`, e.g. a persisted `DisplayName`) IS on the
|
|
39
|
+
* table and is selected (#5899), unless an ancestor further up the chain also has a field of that
|
|
40
|
+
* name: then the row on this parent is an inherited mirror and the ancestor's join supplies it.
|
|
41
|
+
* A name is selected once even if two parents carry it.
|
|
42
|
+
*/
|
|
43
|
+
export declare function InheritedParentColumns(entity: Pick<EntityInfo, 'IsChildType' | 'ParentChain'>): InheritedParentColumn[];
|
|
44
|
+
/** An IS-A child outside this run's scope whose live view lacks columns its in-scope parent now has. */
|
|
45
|
+
export interface OutOfScopeISAChildDrift {
|
|
46
|
+
ChildName: string;
|
|
47
|
+
ChildSchema: string;
|
|
48
|
+
ViewName: string;
|
|
49
|
+
MissingColumns: string[];
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Compares out-of-scope IS-A children's live view columns against the parent columns their view
|
|
53
|
+
* would select ({@link InheritedParentColumns}). Only children with at least one in-scope parent are
|
|
54
|
+
* considered: a parent app's run adds the column but cannot regenerate a sibling app's view (#4821).
|
|
55
|
+
* `liveColumns` maps `schema.view` (lower case) to the view's column names; a view absent from the
|
|
56
|
+
* map does not exist or was not read, and is skipped rather than reported as missing every column.
|
|
57
|
+
*/
|
|
58
|
+
export declare function FindOutOfScopeISAChildDrift(entities: EntityInfo[], excludeSchemas: string[], liveColumns: Map<string, Set<string>>): OutOfScopeISAChildDrift[];
|
|
59
|
+
/** IS-A children in an excluded schema with at least one parent in this run's scope. */
|
|
60
|
+
export declare function OutOfScopeISAChildrenWithInScopeParent(entities: EntityInfo[], excludeSchemas: string[]): EntityInfo[];
|
|
23
61
|
export interface AlternateBaseViewDependencyEntry {
|
|
24
62
|
ReferencedSchema: string;
|
|
25
63
|
ReferencedObject: string;
|
|
@@ -119,6 +157,11 @@ export declare class SQLCodeGenBase {
|
|
|
119
157
|
* entity is on neither the new nor the modified list (the inner view changed on its own).
|
|
120
158
|
*/
|
|
121
159
|
protected layeredEntitiesWithLoggedInnerView: Set<string>;
|
|
160
|
+
/**
|
|
161
|
+
* Names of LAYERED entities whose outer-view refresh was written right after their inner view
|
|
162
|
+
* ({@link logLayeredOuterViewRefresh}). STEP 2(f) does not log their refresh a second time.
|
|
163
|
+
*/
|
|
164
|
+
protected layeredEntitiesWithInlineRefresh: Set<string>;
|
|
122
165
|
ManageSQLScriptsAndExecution(pool: CodeGenConnection, entities: EntityInfo[], directory: string, currentUser: UserInfo): Promise<boolean>;
|
|
123
166
|
/** @deprecated Use {@link ManageSQLScriptsAndExecution}. */
|
|
124
167
|
manageSQLScriptsAndExecution(pool: CodeGenConnection, entities: EntityInfo[], directory: string, currentUser: UserInfo): Promise<boolean>;
|
|
@@ -204,6 +247,14 @@ export declare class SQLCodeGenBase {
|
|
|
204
247
|
Success: boolean;
|
|
205
248
|
Files: string[];
|
|
206
249
|
}>;
|
|
250
|
+
/**
|
|
251
|
+
* Finds stale One To Many EntityRelationship rows among in-scope entities and, when the
|
|
252
|
+
* `cleanupStaleRelationships` config option is set, deletes them; otherwise each one is logged as a
|
|
253
|
+
* warning (#2071). Refreshes the global metadata only when rows were deleted, so the late-phase
|
|
254
|
+
* regeneration that follows sees the current relationships.
|
|
255
|
+
* @returns false when the cleanup failed
|
|
256
|
+
*/
|
|
257
|
+
protected CleanupStaleRelationships(pool: CodeGenConnection, manageMD: ManageMetadataBase): Promise<boolean>;
|
|
207
258
|
DeleteGeneratedEntityFiles(directory: string, entities: EntityInfo[]): void;
|
|
208
259
|
/** @deprecated Use {@link DeleteGeneratedEntityFiles}. */
|
|
209
260
|
deleteGeneratedEntityFiles(directory: string, entities: EntityInfo[]): void;
|
|
@@ -338,6 +389,19 @@ export declare class SQLCodeGenBase {
|
|
|
338
389
|
* base view, are not virtual or externally sourced, and are in the custom-view refresh scope.
|
|
339
390
|
*/
|
|
340
391
|
protected getCustomBaseViewEntitiesForLiveRefresh(includedEntities: EntityInfo[]): EntityInfo[];
|
|
392
|
+
/**
|
|
393
|
+
* Writes the layered entity's view refresh ({@link buildCustomBaseViewRefreshSQL}: inner view,
|
|
394
|
+
* then the guarded outer view, its rebind and alternate views) into the migration log AND the
|
|
395
|
+
* temp batch STEP 2(e) executes, right after the inner view and before the entity's CRUD routines
|
|
396
|
+
* (#4927). The application-owned outer view selects `g.*`, and SQL Server freezes that column list
|
|
397
|
+
* when the view is created; when the inner view's columns change, the routines that read the
|
|
398
|
+
* outer view fail to compile until it is refreshed. STEP 2(f) refreshes the outer view too, but
|
|
399
|
+
* only after the batch has run, which is too late for the routines in it.
|
|
400
|
+
*
|
|
401
|
+
* Called only when the inner view was logged, whether or not the entity is on the new/modified
|
|
402
|
+
* lists. No-op on platforms that rebind views themselves (PostgreSQL's phased executor).
|
|
403
|
+
*/
|
|
404
|
+
protected logLayeredOuterViewRefresh(entity: EntityInfo): void;
|
|
341
405
|
/** True when this run's migration log must carry the entity's custom base view refresh. */
|
|
342
406
|
protected shouldLogCustomBaseViewRefresh(entity: EntityInfo): boolean;
|
|
343
407
|
/**
|
|
@@ -552,7 +616,7 @@ export declare class SQLCodeGenBase {
|
|
|
552
616
|
/**
|
|
553
617
|
* Generates SELECT field expressions for IS-A parent entity columns.
|
|
554
618
|
* Walks the ParentID chain upward, joining to each parent's base table, and includes
|
|
555
|
-
*
|
|
619
|
+
* the columns physically on each parent table ({@link InheritedParentColumns}).
|
|
556
620
|
* Returns a string starting with ',\n' if there are parent fields, or '' if none.
|
|
557
621
|
*/
|
|
558
622
|
protected generateParentEntityFieldSelects(entity: EntityInfo): string;
|
|
@@ -611,6 +675,14 @@ export declare class SQLCodeGenBase {
|
|
|
611
675
|
* - `Disabled` views receive `GenerateDisabledViewRevokePermissionsForTarget` (REVOKE SELECT) so disabling a view revokes database read grants.
|
|
612
676
|
*/
|
|
613
677
|
protected generateAlternateBaseViewsPermissionsSQL(entity: EntityInfo): string;
|
|
678
|
+
/**
|
|
679
|
+
* Warns about IS-A children outside this run's scope whose live view lacks a column their
|
|
680
|
+
* in-scope parent's table now has (#4821). This run cannot regenerate those views: the child
|
|
681
|
+
* belongs to another app, which must run CodeGen or ship a migration. Until it does, the child's
|
|
682
|
+
* metadata (synced by that app's run) and its view disagree, and its saves fail.
|
|
683
|
+
* Never fails the run; a failed catalog read is logged and ignored.
|
|
684
|
+
*/
|
|
685
|
+
WarnOnOutOfScopeISAChildDrift(pool: CodeGenConnection, entities: EntityInfo[], excludeSchemas: string[]): Promise<OutOfScopeISAChildDrift[]>;
|
|
614
686
|
protected validateAlternateBaseViewsForEntities(pool: CodeGenConnection | null | undefined, entities: readonly EntityInfo[]): Promise<void>;
|
|
615
687
|
/**
|
|
616
688
|
* Audits each usable alternate base view on `entity` for column parity with `BaseView`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sql_codegen.d.ts","sourceRoot":"","sources":["../../src/Database/sql_codegen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAwB,2BAA2B,EAAkC,QAAQ,EAAoH,MAAM,sBAAsB,CAAC;AAKlR,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,uBAAuB,EAAmD,iBAAiB,EAAE,qBAAqB,EAAwC,MAAM,2BAA2B,CAAC;AAIrM,OAAO,EAAsB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAWvE,eAAO,MAAM,MA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,MAAM,EACjB,UAAU,EAAE,MAAM,GACnB,OAAO,CAAC,OAAO,CAAC;IAYnB;;;OAGG;IACH,SAAS,CAAC,gCAAgC,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAgDpE;;;OAGG;cACa,8BAA8B,CAAC,QAAQ,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAiCrF;;;OAGG;cACa,gCAAgC,CAAC,QAAQ,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAgCtG;;;OAGG;cACa,6CAA6C,CACzD,IAAI,EAAE,iBAAiB,EACvB,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,GAC9B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAgBvB;;;OAGG;cACa,wCAAwC,CACpD,IAAI,EAAE,iBAAiB,EACvB,QAAQ,EAAE,UAAU,EAAE,GACvB,OAAO,CAAC,IAAI,CAAC;IAoDhB;;;;;;;;OAQG;IACH,SAAS,CAAC,2BAA2B,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE;CA8EzG"}
|
|
@@ -31,6 +31,74 @@ export function EntitiesNotInExcludedSchemas(entities, excludeSchemas) {
|
|
|
31
31
|
export function entitiesNotInExcludedSchemas(entities, excludeSchemas) {
|
|
32
32
|
return EntitiesNotInExcludedSchemas(entities, excludeSchemas);
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* The parent columns an IS-A child's generated base view selects, in parent-chain order and each
|
|
36
|
+
* parent's field order. The child's view joins each parent's BASE TABLE, so a column qualifies only
|
|
37
|
+
* if it is physically on that table:
|
|
38
|
+
* - primary keys are shared with the child and `__mj_` columns are the child's own;
|
|
39
|
+
* - a view-only virtual field (`IsVirtual` and not `IsComputed`) is not on the table and is skipped;
|
|
40
|
+
* - a computed column (`IsVirtual` and `IsComputed`, e.g. a persisted `DisplayName`) IS on the
|
|
41
|
+
* table and is selected (#5899), unless an ancestor further up the chain also has a field of that
|
|
42
|
+
* name: then the row on this parent is an inherited mirror and the ancestor's join supplies it.
|
|
43
|
+
* A name is selected once even if two parents carry it.
|
|
44
|
+
*/
|
|
45
|
+
export function InheritedParentColumns(entity) {
|
|
46
|
+
if (!entity.IsChildType)
|
|
47
|
+
return [];
|
|
48
|
+
const chain = entity.ParentChain;
|
|
49
|
+
const columns = [];
|
|
50
|
+
const seen = new Set();
|
|
51
|
+
for (let i = 0; i < chain.length; i++) {
|
|
52
|
+
const parent = chain[i];
|
|
53
|
+
const ancestorFieldNames = new Set(chain.slice(i + 1).flatMap(a => a.Fields.map(f => f.Name.toLowerCase())));
|
|
54
|
+
for (const field of parent.Fields) {
|
|
55
|
+
if (field.IsPrimaryKey || field.Name.startsWith('__mj_'))
|
|
56
|
+
continue;
|
|
57
|
+
if (field.IsVirtual && (!field.IsComputed || ancestorFieldNames.has(field.Name.toLowerCase())))
|
|
58
|
+
continue;
|
|
59
|
+
const key = field.Name.toLowerCase();
|
|
60
|
+
if (seen.has(key))
|
|
61
|
+
continue;
|
|
62
|
+
seen.add(key);
|
|
63
|
+
columns.push({ Alias: `__mj_isa_p${i + 1}`, Parent: parent, Field: field });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return columns;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Compares out-of-scope IS-A children's live view columns against the parent columns their view
|
|
70
|
+
* would select ({@link InheritedParentColumns}). Only children with at least one in-scope parent are
|
|
71
|
+
* considered: a parent app's run adds the column but cannot regenerate a sibling app's view (#4821).
|
|
72
|
+
* `liveColumns` maps `schema.view` (lower case) to the view's column names; a view absent from the
|
|
73
|
+
* map does not exist or was not read, and is skipped rather than reported as missing every column.
|
|
74
|
+
*/
|
|
75
|
+
export function FindOutOfScopeISAChildDrift(entities, excludeSchemas, liveColumns) {
|
|
76
|
+
const excluded = new Set(excludeSchemas.map(s => s.trim().toLowerCase()));
|
|
77
|
+
const drift = [];
|
|
78
|
+
for (const child of OutOfScopeISAChildrenWithInScopeParent(entities, excludeSchemas)) {
|
|
79
|
+
const viewName = child.GeneratedViewName;
|
|
80
|
+
const live = liveColumns.get(`${child.SchemaName.trim()}.${viewName.trim()}`.toLowerCase());
|
|
81
|
+
if (!live)
|
|
82
|
+
continue;
|
|
83
|
+
const missing = InheritedParentColumns(child)
|
|
84
|
+
.filter(c => !excluded.has(c.Parent.SchemaName.trim().toLowerCase()))
|
|
85
|
+
.map(c => c.Field.Name)
|
|
86
|
+
.filter(name => !live.has(name.trim().toLowerCase()));
|
|
87
|
+
if (missing.length > 0) {
|
|
88
|
+
drift.push({ ChildName: child.Name, ChildSchema: child.SchemaName, ViewName: viewName, MissingColumns: missing });
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return drift;
|
|
92
|
+
}
|
|
93
|
+
/** IS-A children in an excluded schema with at least one parent in this run's scope. */
|
|
94
|
+
export function OutOfScopeISAChildrenWithInScopeParent(entities, excludeSchemas) {
|
|
95
|
+
const excluded = new Set(excludeSchemas.map(s => s.trim().toLowerCase()));
|
|
96
|
+
return entities.filter(e => e.IsChildType &&
|
|
97
|
+
!e.VirtualEntity &&
|
|
98
|
+
!e.ExternalDataSourceID &&
|
|
99
|
+
excluded.has(e.SchemaName.trim().toLowerCase()) &&
|
|
100
|
+
e.ParentChain.some(p => !excluded.has(p.SchemaName.trim().toLowerCase())));
|
|
101
|
+
}
|
|
34
102
|
function stripSQLCommentsAndStringsForAudit(sql) {
|
|
35
103
|
return sql
|
|
36
104
|
.replace(/--[^\r\n]*/g, ' ')
|
|
@@ -197,6 +265,11 @@ export class SQLCodeGenBase {
|
|
|
197
265
|
* entity is on neither the new nor the modified list (the inner view changed on its own).
|
|
198
266
|
*/
|
|
199
267
|
this.layeredEntitiesWithLoggedInnerView = new Set();
|
|
268
|
+
/**
|
|
269
|
+
* Names of LAYERED entities whose outer-view refresh was written right after their inner view
|
|
270
|
+
* ({@link logLayeredOuterViewRefresh}). STEP 2(f) does not log their refresh a second time.
|
|
271
|
+
*/
|
|
272
|
+
this.layeredEntitiesWithInlineRefresh = new Set();
|
|
200
273
|
}
|
|
201
274
|
get SQLUtilityObject() {
|
|
202
275
|
return this._sqlUtilityObject;
|
|
@@ -213,6 +286,7 @@ export class SQLCodeGenBase {
|
|
|
213
286
|
this.existingRoutineDefinitions = null;
|
|
214
287
|
this.driftedRoutines = new Set();
|
|
215
288
|
this.layeredEntitiesWithLoggedInnerView = new Set();
|
|
289
|
+
this.layeredEntitiesWithInlineRefresh = new Set();
|
|
216
290
|
// Build list of entities qualified for forced regeneration if entityWhereClause is provided
|
|
217
291
|
if (configInfo.forceRegeneration?.enabled && configInfo.forceRegeneration?.entityWhereClause) {
|
|
218
292
|
this.filterEntitiesQualifiedForRegeneration = true; // Enable filtering
|
|
@@ -266,9 +340,11 @@ export class SQLCodeGenBase {
|
|
|
266
340
|
StartSpinner('Analyzing cascade delete dependencies...');
|
|
267
341
|
await this.markEntitiesForCascadeDeleteRegeneration(pool, includedEntities);
|
|
268
342
|
SucceedSpinner('Cascade delete dependency analysis completed');
|
|
269
|
-
// STEP 2(a) - clean out all *.generated.sql and *.permissions.generated.sql files from the directory
|
|
343
|
+
// STEP 2(a) - clean out all *.generated.sql and *.permissions.generated.sql files from the directory.
|
|
344
|
+
// Only in-scope schemas' directories (#3384): STEP 2(b) rewrites those, and an out-of-scope
|
|
345
|
+
// schema's files are another run's to regenerate, so deleting them would leave them missing.
|
|
270
346
|
StartSpinner('Cleaning generated files...');
|
|
271
|
-
this.DeleteGeneratedEntityFiles(directory,
|
|
347
|
+
this.DeleteGeneratedEntityFiles(directory, includedEntities);
|
|
272
348
|
SucceedSpinner('Cleaned generated files');
|
|
273
349
|
// STEP 2(a.5) - field-level security / permission-reconciliation run context.
|
|
274
350
|
// One async pass over the live catalog (permission state + service-login role
|
|
@@ -446,6 +522,9 @@ export class SQLCodeGenBase {
|
|
|
446
522
|
// outer view made it delete the rows for columns added this run (#4336). The same refresh
|
|
447
523
|
// is written to the migration log here, ahead of any field-sync SQL, so a replay of the
|
|
448
524
|
// migration runs in the same order. STEP 4.5 still emits its refresh as a safety net.
|
|
525
|
+
// A layered entity whose inner view was logged already had its refresh executed in the
|
|
526
|
+
// STEP 2(e) batch, between the inner view and its CRUD routines (#4927); this pass
|
|
527
|
+
// re-runs it live and does not log it a second time.
|
|
449
528
|
StartSpinner('Refreshing custom base views...');
|
|
450
529
|
if (!await this.RefreshCustomBaseViewsLive(pool, includedEntities)) {
|
|
451
530
|
FailSpinner('Failed to refresh one or more custom base views');
|
|
@@ -495,6 +574,11 @@ export class SQLCodeGenBase {
|
|
|
495
574
|
SucceedSpinner('Entity fields metadata updated');
|
|
496
575
|
}
|
|
497
576
|
// no logStatus/timer for this because manageEntityFields() has its own internal logging for this including the total, so it is redundant to log it here
|
|
577
|
+
// STEP 3.1 - stale One To Many relationships (#2071). Runs after Pass 2's unscoped field prune,
|
|
578
|
+
// so the fields of dropped FK columns are gone. Report-only unless cleanupStaleRelationships is set.
|
|
579
|
+
if (!await this.CleanupStaleRelationships(pool, manageMD)) {
|
|
580
|
+
overallSuccess = false;
|
|
581
|
+
}
|
|
498
582
|
// STEP 3.5 - Late-phase view regeneration
|
|
499
583
|
// Some late-phase changes (e.g., SupportsGeoCoding toggled during advanced generation)
|
|
500
584
|
// affect view structure but happen AFTER views were already generated in Step 2.
|
|
@@ -579,6 +663,8 @@ export class SQLCodeGenBase {
|
|
|
579
663
|
// now - we need to tell our metadata object to refresh itself
|
|
580
664
|
const md = new Metadata(); // global-provider-ok: codegen runs offline against a single provider
|
|
581
665
|
await md.Refresh();
|
|
666
|
+
// Advisory only: an out-of-scope IS-A child's view is another app's to regenerate.
|
|
667
|
+
await this.WarnOnOutOfScopeISAChildDrift(pool, md.Entities, configInfo.excludeSchemas ?? []);
|
|
582
668
|
return overallSuccess;
|
|
583
669
|
}
|
|
584
670
|
catch (err) {
|
|
@@ -855,6 +941,26 @@ export class SQLCodeGenBase {
|
|
|
855
941
|
async generateAndExecuteEntitySQLToSeparateFiles(options) {
|
|
856
942
|
return this.GenerateAndExecuteEntitySQLToSeparateFiles(options);
|
|
857
943
|
}
|
|
944
|
+
/**
|
|
945
|
+
* Finds stale One To Many EntityRelationship rows among in-scope entities and, when the
|
|
946
|
+
* `cleanupStaleRelationships` config option is set, deletes them; otherwise each one is logged as a
|
|
947
|
+
* warning (#2071). Refreshes the global metadata only when rows were deleted, so the late-phase
|
|
948
|
+
* regeneration that follows sees the current relationships.
|
|
949
|
+
* @returns false when the cleanup failed
|
|
950
|
+
*/
|
|
951
|
+
async CleanupStaleRelationships(pool, manageMD) {
|
|
952
|
+
const dryRun = configInfo.cleanupStaleRelationships !== true;
|
|
953
|
+
if (!await manageMD.CleanupStaleEntityRelationships(pool, configInfo.excludeSchemas ?? [], { DryRun: dryRun })) {
|
|
954
|
+
logError('Failed to check for stale entity relationships');
|
|
955
|
+
return false;
|
|
956
|
+
}
|
|
957
|
+
if (manageMD.StaleRelationshipsRemoved > 0) {
|
|
958
|
+
logStatus(` Removed ${manageMD.StaleRelationshipsRemoved} stale entity relationship(s); refreshing metadata`);
|
|
959
|
+
const md = new Metadata(); // global-provider-ok: codegen runs offline against a single provider
|
|
960
|
+
await md.Refresh();
|
|
961
|
+
}
|
|
962
|
+
return true;
|
|
963
|
+
}
|
|
858
964
|
DeleteGeneratedEntityFiles(directory, entities) {
|
|
859
965
|
try {
|
|
860
966
|
// for the schemas associated with the specified entities, clean out all the generated files
|
|
@@ -1290,7 +1396,8 @@ export class SQLCodeGenBase {
|
|
|
1290
1396
|
failures.push(`${entity.SchemaName}.${entity.BaseView} (${entity.Name}): ${e instanceof Error ? e.message : String(e)}`);
|
|
1291
1397
|
}
|
|
1292
1398
|
}
|
|
1293
|
-
|
|
1399
|
+
// A layered entity whose refresh already follows its inner view in the log is not logged again.
|
|
1400
|
+
const toLog = targets.filter(e => this.shouldLogCustomBaseViewRefresh(e) && !this.layeredEntitiesWithInlineRefresh.has(e.Name));
|
|
1294
1401
|
if (toLog.length > 0) {
|
|
1295
1402
|
await SQLLogging.AppendToSQLLogFile(this.buildCustomBaseViewRefreshSQL(toLog), 'Refresh custom base views before entity field sync so new columns are not pruned');
|
|
1296
1403
|
}
|
|
@@ -1312,6 +1419,32 @@ export class SQLCodeGenBase {
|
|
|
1312
1419
|
!!e.BaseView &&
|
|
1313
1420
|
EntityInCustomBaseViewRefreshScope(e.SchemaName, configInfo.excludeSchemas ?? [], configInfo.includeSchemas));
|
|
1314
1421
|
}
|
|
1422
|
+
/**
|
|
1423
|
+
* Writes the layered entity's view refresh ({@link buildCustomBaseViewRefreshSQL}: inner view,
|
|
1424
|
+
* then the guarded outer view, its rebind and alternate views) into the migration log AND the
|
|
1425
|
+
* temp batch STEP 2(e) executes, right after the inner view and before the entity's CRUD routines
|
|
1426
|
+
* (#4927). The application-owned outer view selects `g.*`, and SQL Server freezes that column list
|
|
1427
|
+
* when the view is created; when the inner view's columns change, the routines that read the
|
|
1428
|
+
* outer view fail to compile until it is refreshed. STEP 2(f) refreshes the outer view too, but
|
|
1429
|
+
* only after the batch has run, which is too late for the routines in it.
|
|
1430
|
+
*
|
|
1431
|
+
* Called only when the inner view was logged, whether or not the entity is on the new/modified
|
|
1432
|
+
* lists. No-op on platforms that rebind views themselves (PostgreSQL's phased executor).
|
|
1433
|
+
*/
|
|
1434
|
+
logLayeredOuterViewRefresh(entity) {
|
|
1435
|
+
if (!this._dbProvider.NeedsViewRefresh || !entity.HasLayeredBaseView || !entity.BaseView ||
|
|
1436
|
+
entity.VirtualEntity || entity.ExternalDataSourceID) {
|
|
1437
|
+
return;
|
|
1438
|
+
}
|
|
1439
|
+
const refreshSQL = this.buildCustomBaseViewRefreshSQL([entity]);
|
|
1440
|
+
if (refreshSQL.trim().length === 0) {
|
|
1441
|
+
return;
|
|
1442
|
+
}
|
|
1443
|
+
// Closed with its own batch separator: the migration log appends units without one, and the
|
|
1444
|
+
// unit that follows may start with a statement that must open its batch.
|
|
1445
|
+
this.logSQLForNewOrModifiedEntity(entity, `${refreshSQL}\n${this._dbProvider.BatchSeparator}`, `Refresh layered base view for ${entity.Name} after its inner view changed`, true, true);
|
|
1446
|
+
this.layeredEntitiesWithInlineRefresh.add(entity.Name);
|
|
1447
|
+
}
|
|
1315
1448
|
/** True when this run's migration log must carry the entity's custom base view refresh. */
|
|
1316
1449
|
shouldLogCustomBaseViewRefresh(entity) {
|
|
1317
1450
|
return ManageMetadataBase.newEntityList.includes(entity.Name) ||
|
|
@@ -1469,6 +1602,7 @@ export class SQLCodeGenBase {
|
|
|
1469
1602
|
const viewLogged = this.logSQLForNewOrModifiedEntity(options.entity, s, `Base View SQL for ${options.entity.Name}`, options.enableSQLLoggingForNewOrModifiedEntities, baseViewChanged);
|
|
1470
1603
|
if (viewLogged && options.entity.HasLayeredBaseView) {
|
|
1471
1604
|
this.layeredEntitiesWithLoggedInnerView.add(options.entity.Name);
|
|
1605
|
+
this.logLayeredOuterViewRefresh(options.entity);
|
|
1472
1606
|
}
|
|
1473
1607
|
files.push(filePath);
|
|
1474
1608
|
}
|
|
@@ -2151,26 +2285,13 @@ export class SQLCodeGenBase {
|
|
|
2151
2285
|
/**
|
|
2152
2286
|
* Generates SELECT field expressions for IS-A parent entity columns.
|
|
2153
2287
|
* Walks the ParentID chain upward, joining to each parent's base table, and includes
|
|
2154
|
-
*
|
|
2288
|
+
* the columns physically on each parent table ({@link InheritedParentColumns}).
|
|
2155
2289
|
* Returns a string starting with ',\n' if there are parent fields, or '' if none.
|
|
2156
2290
|
*/
|
|
2157
2291
|
generateParentEntityFieldSelects(entity) {
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
const
|
|
2161
|
-
if (parentChain.length === 0)
|
|
2162
|
-
return '';
|
|
2163
|
-
const fieldExpressions = [];
|
|
2164
|
-
for (let i = 0; i < parentChain.length; i++) {
|
|
2165
|
-
const parent = parentChain[i];
|
|
2166
|
-
const alias = `__mj_isa_p${i + 1}`;
|
|
2167
|
-
for (const field of parent.Fields) {
|
|
2168
|
-
// Skip PKs (shared with child), timestamps, and virtual fields (view-computed)
|
|
2169
|
-
if (field.IsPrimaryKey || field.Name.startsWith('__mj_') || field.IsVirtual)
|
|
2170
|
-
continue;
|
|
2171
|
-
fieldExpressions.push(` ${alias}.${this._dbProvider.Dialect.QuoteIdentifier(field.Name)}`);
|
|
2172
|
-
}
|
|
2173
|
-
}
|
|
2292
|
+
// Which parent columns qualify (PKs, __mj_ and view-only virtual fields are skipped;
|
|
2293
|
+
// computed columns are kept): see InheritedParentColumns.
|
|
2294
|
+
const fieldExpressions = InheritedParentColumns(entity).map(c => ` ${c.Alias}.${this._dbProvider.Dialect.QuoteIdentifier(c.Field.Name)}`);
|
|
2174
2295
|
if (fieldExpressions.length === 0)
|
|
2175
2296
|
return '';
|
|
2176
2297
|
return ',\n' + fieldExpressions.join(',\n');
|
|
@@ -2372,6 +2493,46 @@ export class SQLCodeGenBase {
|
|
|
2372
2493
|
}
|
|
2373
2494
|
return sOutput;
|
|
2374
2495
|
}
|
|
2496
|
+
/**
|
|
2497
|
+
* Warns about IS-A children outside this run's scope whose live view lacks a column their
|
|
2498
|
+
* in-scope parent's table now has (#4821). This run cannot regenerate those views: the child
|
|
2499
|
+
* belongs to another app, which must run CodeGen or ship a migration. Until it does, the child's
|
|
2500
|
+
* metadata (synced by that app's run) and its view disagree, and its saves fail.
|
|
2501
|
+
* Never fails the run; a failed catalog read is logged and ignored.
|
|
2502
|
+
*/
|
|
2503
|
+
async WarnOnOutOfScopeISAChildDrift(pool, entities, excludeSchemas) {
|
|
2504
|
+
const children = OutOfScopeISAChildrenWithInScopeParent(entities, excludeSchemas);
|
|
2505
|
+
if (children.length === 0) {
|
|
2506
|
+
return [];
|
|
2507
|
+
}
|
|
2508
|
+
try {
|
|
2509
|
+
const esc = (s) => s.replace(/'/g, "''");
|
|
2510
|
+
const predicates = children.map(c => `(TABLE_SCHEMA = '${esc(c.SchemaName)}' AND TABLE_NAME = '${esc(c.GeneratedViewName)}')`);
|
|
2511
|
+
const sql = `SELECT TABLE_SCHEMA AS "TableSchema", TABLE_NAME AS "TableName", COLUMN_NAME AS "ColumnName"
|
|
2512
|
+
FROM INFORMATION_SCHEMA.COLUMNS
|
|
2513
|
+
WHERE ${predicates.join(' OR ')}`;
|
|
2514
|
+
const result = await pool.query(sql);
|
|
2515
|
+
const live = new Map();
|
|
2516
|
+
for (const row of result.recordset) {
|
|
2517
|
+
const key = `${row.TableSchema}.${row.TableName}`.toLowerCase();
|
|
2518
|
+
const cols = live.get(key) ?? new Set();
|
|
2519
|
+
cols.add(row.ColumnName.toLowerCase());
|
|
2520
|
+
live.set(key, cols);
|
|
2521
|
+
}
|
|
2522
|
+
const drift = FindOutOfScopeISAChildDrift(entities, excludeSchemas, live);
|
|
2523
|
+
for (const d of drift) {
|
|
2524
|
+
LogWarning(`IS-A child '${d.ChildName}' is outside this run's scope, and its view ${d.ChildSchema}.${d.ViewName} ` +
|
|
2525
|
+
`lacks column(s) its parent now has: ${d.MissingColumns.join(', ')}. ` +
|
|
2526
|
+
`Run CodeGen for schema '${d.ChildSchema}', or ship a migration there that regenerates the view; ` +
|
|
2527
|
+
`once the child's EntityField rows list the column, saves fail until the view has it.`);
|
|
2528
|
+
}
|
|
2529
|
+
return drift;
|
|
2530
|
+
}
|
|
2531
|
+
catch (e) {
|
|
2532
|
+
LogIf(configInfo.verboseOutput, `Could not check out-of-scope IS-A child views: ${e instanceof Error ? e.message : String(e)}`);
|
|
2533
|
+
return [];
|
|
2534
|
+
}
|
|
2535
|
+
}
|
|
2375
2536
|
async validateAlternateBaseViewsForEntities(pool, entities) {
|
|
2376
2537
|
if (!pool || typeof pool.query !== 'function') {
|
|
2377
2538
|
return;
|