@memberjunction/codegen-lib 6.2.0-edge.4 → 6.2.0-edge.6
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 +7 -0
- package/dist/Angular/angular-codegen.d.ts.map +1 -1
- package/dist/Angular/angular-codegen.js +2 -0
- package/dist/Angular/angular-codegen.js.map +1 -1
- package/dist/Config/config.d.ts +162 -0
- package/dist/Config/config.d.ts.map +1 -1
- package/dist/Config/config.js +81 -2
- package/dist/Config/config.js.map +1 -1
- package/dist/Database/codeGenDatabaseProvider.d.ts +205 -6
- package/dist/Database/codeGenDatabaseProvider.d.ts.map +1 -1
- package/dist/Database/codeGenDatabaseProvider.js +367 -5
- package/dist/Database/codeGenDatabaseProvider.js.map +1 -1
- package/dist/Database/heal-schema-params.d.ts +7 -0
- package/dist/Database/heal-schema-params.d.ts.map +1 -1
- package/dist/Database/heal-schema-params.js +5 -0
- package/dist/Database/heal-schema-params.js.map +1 -1
- package/dist/Database/manage-metadata.d.ts +290 -7
- package/dist/Database/manage-metadata.d.ts.map +1 -1
- package/dist/Database/manage-metadata.js +737 -67
- package/dist/Database/manage-metadata.js.map +1 -1
- package/dist/Database/providers/postgresql/PostgreSQLCodeGenProvider.d.ts +61 -8
- package/dist/Database/providers/postgresql/PostgreSQLCodeGenProvider.d.ts.map +1 -1
- package/dist/Database/providers/postgresql/PostgreSQLCodeGenProvider.js +238 -48
- package/dist/Database/providers/postgresql/PostgreSQLCodeGenProvider.js.map +1 -1
- package/dist/Database/providers/postgresql/__tests__/MetadataSupportObjectsDDL.test.d.ts +2 -0
- package/dist/Database/providers/postgresql/__tests__/MetadataSupportObjectsDDL.test.d.ts.map +1 -0
- package/dist/Database/providers/postgresql/__tests__/MetadataSupportObjectsDDL.test.js +127 -0
- package/dist/Database/providers/postgresql/__tests__/MetadataSupportObjectsDDL.test.js.map +1 -0
- package/dist/Database/providers/postgresql/metadataSupportObjects.js +200 -8
- package/dist/Database/providers/postgresql/metadataSupportObjects.js.map +1 -1
- package/dist/Database/providers/sqlserver/SQLServerCodeGenProvider.d.ts +63 -13
- package/dist/Database/providers/sqlserver/SQLServerCodeGenProvider.d.ts.map +1 -1
- package/dist/Database/providers/sqlserver/SQLServerCodeGenProvider.js +204 -72
- package/dist/Database/providers/sqlserver/SQLServerCodeGenProvider.js.map +1 -1
- package/dist/Database/providers/sqlserver/__tests__/VerifiedJoinIndexes.test.d.ts +2 -0
- package/dist/Database/providers/sqlserver/__tests__/VerifiedJoinIndexes.test.d.ts.map +1 -0
- package/dist/Database/providers/sqlserver/__tests__/VerifiedJoinIndexes.test.js +141 -0
- package/dist/Database/providers/sqlserver/__tests__/VerifiedJoinIndexes.test.js.map +1 -0
- package/dist/Database/providers/sqlserver/sqlServerDefaultValues.d.ts +47 -0
- package/dist/Database/providers/sqlserver/sqlServerDefaultValues.d.ts.map +1 -0
- package/dist/Database/providers/sqlserver/sqlServerDefaultValues.js +167 -0
- package/dist/Database/providers/sqlserver/sqlServerDefaultValues.js.map +1 -0
- package/dist/Database/providers/sqlserver/sqlServerScriptText.d.ts +31 -0
- package/dist/Database/providers/sqlserver/sqlServerScriptText.d.ts.map +1 -0
- package/dist/Database/providers/sqlserver/sqlServerScriptText.js +116 -0
- package/dist/Database/providers/sqlserver/sqlServerScriptText.js.map +1 -0
- package/dist/Database/sql.d.ts +13 -0
- package/dist/Database/sql.d.ts.map +1 -1
- package/dist/Database/sql.js +39 -8
- package/dist/Database/sql.js.map +1 -1
- package/dist/Database/sql_codegen.d.ts +176 -4
- package/dist/Database/sql_codegen.d.ts.map +1 -1
- package/dist/Database/sql_codegen.js +676 -37
- package/dist/Database/sql_codegen.js.map +1 -1
- package/dist/Manifest/GenerateClassRegistrationsManifest.d.ts +9 -0
- package/dist/Manifest/GenerateClassRegistrationsManifest.d.ts.map +1 -1
- package/dist/Manifest/GenerateClassRegistrationsManifest.js +28 -7
- package/dist/Manifest/GenerateClassRegistrationsManifest.js.map +1 -1
- package/dist/Misc/entity_subclasses_codegen.d.ts.map +1 -1
- package/dist/Misc/entity_subclasses_codegen.js +18 -2
- package/dist/Misc/entity_subclasses_codegen.js.map +1 -1
- package/dist/Misc/system_integrity.d.ts +48 -0
- package/dist/Misc/system_integrity.d.ts.map +1 -1
- package/dist/Misc/system_integrity.js +151 -75
- package/dist/Misc/system_integrity.js.map +1 -1
- package/dist/runCodeGen.d.ts +35 -3
- package/dist/runCodeGen.d.ts.map +1 -1
- package/dist/runCodeGen.js +135 -45
- package/dist/runCodeGen.js.map +1 -1
- package/package.json +29 -29
|
@@ -291,6 +291,36 @@ BEGIN
|
|
|
291
291
|
CREATE TEMP TABLE _uef_uk AS SELECT * FROM __mj."vwTableUniqueKeys";
|
|
292
292
|
ANALYZE _uef_uk;
|
|
293
293
|
|
|
294
|
+
-- Orphan-tolerant renumber (#4050): an EntityField row whose column is no longer in the base
|
|
295
|
+
-- view never joins _uef_cols below, so it is never renumbered and keeps its old Sequence. When
|
|
296
|
+
-- that slot is inside the live column range, the live field that must move onto it collides on
|
|
297
|
+
-- UQ_EntityField_EntityID_Sequence and the whole metadata pass fails. Park such orphans above
|
|
298
|
+
-- the entity's current maximum first; the prune step deletes them later. Orphans already above
|
|
299
|
+
-- the live range are left alone, so repeated runs do not keep moving them.
|
|
300
|
+
UPDATE __mj."EntityField" tgt SET
|
|
301
|
+
"Sequence" = mx.max_sequence + o.rn
|
|
302
|
+
FROM (
|
|
303
|
+
SELECT ef."ID" AS field_id, ef."EntityID" AS entity_id,
|
|
304
|
+
ROW_NUMBER() OVER (PARTITION BY ef."EntityID" ORDER BY ef."Sequence", ef."Name") AS rn
|
|
305
|
+
FROM __mj."EntityField" ef
|
|
306
|
+
INNER JOIN __mj."Entity" e ON e."ID" = ef."EntityID"
|
|
307
|
+
INNER JOIN (SELECT c."EntityID", MAX(c."Sequence") AS live_max FROM _uef_cols c GROUP BY c."EntityID") lm
|
|
308
|
+
ON lm."EntityID" = ef."EntityID"
|
|
309
|
+
LEFT JOIN _uef_excluded ex ON e."SchemaName"::text = ex.schema_name
|
|
310
|
+
WHERE e."VirtualEntity" = FALSE
|
|
311
|
+
AND ex.schema_name IS NULL
|
|
312
|
+
AND (NOT v_has_include OR e."SchemaName"::text IN (SELECT i.schema_name FROM _uef_included i))
|
|
313
|
+
AND (NOT v_is_scoped OR e."ID" IN (SELECT s.entity_id FROM _uef_scope s))
|
|
314
|
+
AND ef."Sequence" <= lm.live_max
|
|
315
|
+
AND NOT EXISTS (
|
|
316
|
+
SELECT 1 FROM _uef_cols c
|
|
317
|
+
WHERE c."EntityID" = ef."EntityID" AND c."FieldName"::text = ef."Name"::text
|
|
318
|
+
)
|
|
319
|
+
) o
|
|
320
|
+
INNER JOIN (SELECT f."EntityID", MAX(f."Sequence") AS max_sequence FROM __mj."EntityField" f GROUP BY f."EntityID") mx
|
|
321
|
+
ON mx."EntityID" = o.entity_id
|
|
322
|
+
WHERE tgt."ID" = o.field_id;
|
|
323
|
+
|
|
294
324
|
DROP TABLE IF EXISTS _uef_filtered;
|
|
295
325
|
CREATE TEMP TABLE _uef_filtered AS
|
|
296
326
|
SELECT * FROM (
|
|
@@ -319,6 +349,11 @@ BEGIN
|
|
|
319
349
|
fk."referenced_column"::text AS related_entity_field_name,
|
|
320
350
|
(pk."ColumnName" IS NOT NULL) AS new_is_primary_key,
|
|
321
351
|
(pk."ColumnName" IS NOT NULL OR uk."ColumnName" IS NOT NULL) AS new_is_unique,
|
|
352
|
+
-- IS-A inherited row (#4569): a virtual, updatable field on a child entity, copied from its
|
|
353
|
+
-- parent by manageParentEntityFields. The column lives in the parent's table, so the FK lookup
|
|
354
|
+
-- above (keyed on the child's table) finds nothing; its RelatedEntity* values come from the
|
|
355
|
+
-- parent field and must not be overwritten with NULL here.
|
|
356
|
+
(e."ParentID" IS NOT NULL AND ef."IsVirtual" AND ef."AllowUpdateAPI") AS is_isa_inherited,
|
|
322
357
|
-- is_material_change = a change that actually affects the generated view/sproc SQL. This is the
|
|
323
358
|
-- SINGLE definition of "material" — the row filter (outer WHERE) and the modified-entity RETURN
|
|
324
359
|
-- both derive from it, so there is no duplicated predicate to keep in sync. A pure Sequence
|
|
@@ -338,8 +373,10 @@ BEGIN
|
|
|
338
373
|
OR __mj."fnNormalizeDefaultValue"(ef."DefaultValue") IS DISTINCT FROM __mj."fnNormalizeDefaultValue"(sq."DefaultValue")
|
|
339
374
|
OR ef."AutoIncrement" <> (sq."AutoIncrement" <> 0)
|
|
340
375
|
OR ef."IsVirtual" <> (sq."IsVirtual" <> 0)
|
|
341
|
-
-- Soft-FK guard: preserve soft FKs and respect AutoUpdateRelatedEntityInfo
|
|
342
|
-
|
|
376
|
+
-- Soft-FK guard: preserve soft FKs and respect AutoUpdateRelatedEntityInfo; IS-A inherited
|
|
377
|
+
-- rows keep the relationship copied from the parent field
|
|
378
|
+
OR (ef."AutoUpdateRelatedEntityInfo" AND NOT ef."IsSoftForeignKey"
|
|
379
|
+
AND NOT (e."ParentID" IS NOT NULL AND ef."IsVirtual" AND ef."AllowUpdateAPI") AND (
|
|
343
380
|
COALESCE(ef."RelatedEntityID", '00000000-0000-0000-0000-000000000000'::uuid) <>
|
|
344
381
|
COALESCE(re."ID", '00000000-0000-0000-0000-000000000000'::uuid)
|
|
345
382
|
OR COALESCE(TRIM(ef."RelatedEntityFieldName"), '') <> COALESCE(TRIM(fk."referenced_column"::text), '')
|
|
@@ -363,8 +400,10 @@ BEGIN
|
|
|
363
400
|
CASE WHEN ef."AutoIncrement" <> (sq."AutoIncrement" <> 0) THEN 'AutoIncrement' END,
|
|
364
401
|
CASE WHEN ef."IsVirtual" <> (sq."IsVirtual" <> 0) THEN 'IsVirtual' END,
|
|
365
402
|
CASE WHEN ef."IsComputed" <> (sq."IsComputed" <> 0) THEN 'IsComputed' END,
|
|
366
|
-
CASE WHEN
|
|
367
|
-
|
|
403
|
+
CASE WHEN NOT (e."ParentID" IS NOT NULL AND ef."IsVirtual" AND ef."AllowUpdateAPI")
|
|
404
|
+
AND COALESCE(ef."RelatedEntityID", '00000000-0000-0000-0000-000000000000'::uuid) <> COALESCE(re."ID", '00000000-0000-0000-0000-000000000000'::uuid) THEN 'RelatedEntityID' END,
|
|
405
|
+
CASE WHEN NOT (e."ParentID" IS NOT NULL AND ef."IsVirtual" AND ef."AllowUpdateAPI")
|
|
406
|
+
AND COALESCE(TRIM(ef."RelatedEntityFieldName"), '') <> COALESCE(TRIM(fk."referenced_column"::text), '') THEN 'RelatedEntityFieldName' END,
|
|
368
407
|
CASE WHEN (NOT ef."IsSoftPrimaryKey" AND ef."IsPrimaryKey" <> (pk."ColumnName" IS NOT NULL)) THEN 'IsPrimaryKey' END,
|
|
369
408
|
CASE WHEN (NOT ef."IsSoftPrimaryKey" AND ef."IsUnique" <> (pk."ColumnName" IS NOT NULL OR uk."ColumnName" IS NOT NULL)) THEN 'IsUnique' END,
|
|
370
409
|
CASE WHEN (ef."AllowUpdateAPI" = TRUE AND sq."IsVirtual" <> 0 AND ef."IsVirtual" = FALSE) THEN 'AllowUpdateAPI' END,
|
|
@@ -422,8 +461,8 @@ BEGIN
|
|
|
422
461
|
"IsVirtual" = fr.new_is_virtual,
|
|
423
462
|
"IsComputed" = fr.new_is_computed,
|
|
424
463
|
"Sequence" = fr.new_sequence,
|
|
425
|
-
"RelatedEntityID" = CASE WHEN tgt."AutoUpdateRelatedEntityInfo" AND NOT tgt."IsSoftForeignKey" THEN fr.related_entity_id ELSE tgt."RelatedEntityID" END,
|
|
426
|
-
"RelatedEntityFieldName" = CASE WHEN tgt."AutoUpdateRelatedEntityInfo" AND NOT tgt."IsSoftForeignKey" THEN fr.related_entity_field_name ELSE tgt."RelatedEntityFieldName" END,
|
|
464
|
+
"RelatedEntityID" = CASE WHEN tgt."AutoUpdateRelatedEntityInfo" AND NOT tgt."IsSoftForeignKey" AND NOT fr.is_isa_inherited THEN fr.related_entity_id ELSE tgt."RelatedEntityID" END,
|
|
465
|
+
"RelatedEntityFieldName" = CASE WHEN tgt."AutoUpdateRelatedEntityInfo" AND NOT tgt."IsSoftForeignKey" AND NOT fr.is_isa_inherited THEN fr.related_entity_field_name ELSE tgt."RelatedEntityFieldName" END,
|
|
427
466
|
-- U2 — soft-PK guard: never let the physical-schema sync wipe a soft PK's flags
|
|
428
467
|
"IsPrimaryKey" = CASE WHEN tgt."IsSoftPrimaryKey" THEN tgt."IsPrimaryKey" ELSE fr.new_is_primary_key END,
|
|
429
468
|
"IsUnique" = CASE WHEN tgt."IsSoftPrimaryKey" THEN tgt."IsUnique" ELSE fr.new_is_unique END,
|
|
@@ -485,6 +524,17 @@ BEGIN
|
|
|
485
524
|
WHERE TRIM(s) <> '';
|
|
486
525
|
v_has_include := EXISTS (SELECT 1 FROM _ues_included);
|
|
487
526
|
|
|
527
|
+
-- [Large Schema Series] vwSQLTablesAndEntities is a function-based scan over pg_catalog
|
|
528
|
+
-- (obj_description/pg_class/pg_namespace per table), so the planner has NO row statistics
|
|
529
|
+
-- for it and estimates every join against it at rows=1 -> a nested loop that re-scans the
|
|
530
|
+
-- catalog per Entity row. This is the same defect that was fixed in
|
|
531
|
+
-- spUpdateExistingEntityFieldsFromSchema and spDeleteUnneededEntityFields (materialise the
|
|
532
|
+
-- introspection view exactly once, then ANALYZE so the reconciliation join hash-joins);
|
|
533
|
+
-- this proc was the one that kept joining the view directly.
|
|
534
|
+
DROP TABLE IF EXISTS _ues_tables;
|
|
535
|
+
CREATE TEMP TABLE _ues_tables AS SELECT * FROM __mj."vwSQLTablesAndEntities";
|
|
536
|
+
ANALYZE _ues_tables;
|
|
537
|
+
|
|
488
538
|
DROP TABLE IF EXISTS _ues_filtered;
|
|
489
539
|
CREATE TEMP TABLE _ues_filtered AS
|
|
490
540
|
SELECT
|
|
@@ -495,7 +545,7 @@ BEGIN
|
|
|
495
545
|
sq."EntityDescription" AS entity_description,
|
|
496
546
|
sq."SchemaName"::text AS schema_name
|
|
497
547
|
FROM __mj."Entity" e
|
|
498
|
-
INNER JOIN
|
|
548
|
+
INNER JOIN _ues_tables sq ON e."ID" = sq."EntityID"
|
|
499
549
|
LEFT JOIN unnest(string_to_array(COALESCE(p_ExcludedSchemaNames, ''), ',')) AS ex(v)
|
|
500
550
|
ON sq."SchemaName"::text = TRIM(ex.v)
|
|
501
551
|
WHERE e."VirtualEntity" = FALSE
|
|
@@ -503,6 +553,10 @@ BEGIN
|
|
|
503
553
|
AND (NOT v_has_include OR sq."SchemaName"::text IN (SELECT i.schema_name FROM _ues_included i))
|
|
504
554
|
AND COALESCE(CASE WHEN e."AutoUpdateDescription" THEN sq."EntityDescription" ELSE e."Description" END, '')
|
|
505
555
|
<> COALESCE(e."Description", '');
|
|
556
|
+
-- [Large Schema Series] ANALYZE before the UPDATE ... FROM below, for the same reason:
|
|
557
|
+
-- without stats the planner estimates this temp table at rows=1 and nested-loops the
|
|
558
|
+
-- update against __mj."Entity".
|
|
559
|
+
ANALYZE _ues_filtered;
|
|
506
560
|
|
|
507
561
|
UPDATE __mj."Entity" tgt SET
|
|
508
562
|
"Description" = fr.new_description,
|
|
@@ -516,6 +570,7 @@ BEGIN
|
|
|
516
570
|
FROM _ues_filtered fr;
|
|
517
571
|
|
|
518
572
|
DROP TABLE IF EXISTS _ues_filtered;
|
|
573
|
+
DROP TABLE IF EXISTS _ues_tables;
|
|
519
574
|
DROP TABLE IF EXISTS _ues_included;
|
|
520
575
|
END;
|
|
521
576
|
$func$;
|
|
@@ -529,10 +584,14 @@ $func$;
|
|
|
529
584
|
DROP FUNCTION IF EXISTS __mj."spDeleteUnneededEntityFields"(TEXT);
|
|
530
585
|
DROP FUNCTION IF EXISTS __mj."spDeleteUnneededEntityFields"(TEXT, TEXT);
|
|
531
586
|
DROP FUNCTION IF EXISTS __mj."spDeleteUnneededEntityFields"(TEXT, TEXT, TEXT);
|
|
587
|
+
DROP FUNCTION IF EXISTS __mj."spDeleteUnneededEntityFields"(TEXT, TEXT, TEXT, TEXT);
|
|
532
588
|
CREATE OR REPLACE FUNCTION __mj."spDeleteUnneededEntityFields"(
|
|
533
589
|
p_ExcludedSchemaNames TEXT,
|
|
534
590
|
p_EntityIDs TEXT DEFAULT NULL,
|
|
535
|
-
p_IncludedSchemaNames TEXT DEFAULT NULL
|
|
591
|
+
p_IncludedSchemaNames TEXT DEFAULT NULL,
|
|
592
|
+
-- Comma-delimited field names that must NEVER be pruned, whatever the catalog says.
|
|
593
|
+
-- See the _del_protected note below for why this parameter has to exist.
|
|
594
|
+
p_ProtectedFieldNames TEXT DEFAULT NULL
|
|
536
595
|
)
|
|
537
596
|
RETURNS TABLE(
|
|
538
597
|
"ID" UUID,
|
|
@@ -584,6 +643,23 @@ BEGIN
|
|
|
584
643
|
-- NOTE (parity): the ENTITY-level prune (vwEntitiesWithMissingBaseTables + the ExternalDataSourceID
|
|
585
644
|
-- guard in manage-metadata) is likewise inert on PG until that same migration also recreates
|
|
586
645
|
-- vwEntitiesWithMissingBaseTables as SELECT e.* (mirroring SQL Server migration V202607031201).
|
|
646
|
+
-- PROTECTED FIELD NAMES. The orphan join below is "an EntityField with no column in
|
|
647
|
+
-- vwSQLColumnsAndEntityFields", and that view resolves columns VIEW-FIRST
|
|
648
|
+
-- (COALESCE(e.view_object_id, e.object_id)). So for any entity that has a base view, the
|
|
649
|
+
-- prune's real question is "is this column in the BASE VIEW?" — not "is it in the base table?".
|
|
650
|
+
-- That makes the prune and a deliberate base-view column exclusion directly incompatible:
|
|
651
|
+
-- exclude a physical column from the view and the very next CodeGen run deletes its EntityField
|
|
652
|
+
-- row, taking the sync writes that go through it with it, silently. A field named here is held
|
|
653
|
+
-- back from the prune so an exclusion cannot destroy metadata.
|
|
654
|
+
--
|
|
655
|
+
-- It is a NAME list, not an id list, because the caller's exclusions are declared by name and
|
|
656
|
+
-- apply across entities. Matched case-insensitively for the same reason.
|
|
657
|
+
DROP TABLE IF EXISTS _del_protected;
|
|
658
|
+
CREATE TEMP TABLE _del_protected AS
|
|
659
|
+
SELECT LOWER(TRIM(s)) AS field_name
|
|
660
|
+
FROM unnest(string_to_array(COALESCE(p_ProtectedFieldNames, ''), ',')) AS s
|
|
661
|
+
WHERE TRIM(s) <> '';
|
|
662
|
+
|
|
587
663
|
DROP TABLE IF EXISTS _del_ext_entities;
|
|
588
664
|
CREATE TEMP TABLE _del_ext_entities (entity_id UUID);
|
|
589
665
|
IF EXISTS (
|
|
@@ -605,6 +681,7 @@ BEGIN
|
|
|
605
681
|
WHERE e."VirtualEntity" = FALSE
|
|
606
682
|
AND ef."EntityID" NOT IN (SELECT entity_id FROM _del_ext_entities) -- exclude external-data-source entities (see note above)
|
|
607
683
|
AND ex.v IS NULL
|
|
684
|
+
AND LOWER(TRIM(ef."Name"::text)) NOT IN (SELECT pr.field_name FROM _del_protected pr) -- see _del_protected
|
|
608
685
|
AND (NOT v_has_include OR e."SchemaName"::text IN (SELECT i.schema_name FROM _del_included i))
|
|
609
686
|
AND (NOT v_is_scoped OR ef."EntityID" IN (SELECT s.entity_id FROM _del_scope s));
|
|
610
687
|
-- [Large Schema Series] ANALYZE so the planner has real cardinalities for the
|
|
@@ -640,6 +717,8 @@ BEGIN
|
|
|
640
717
|
DELETE FROM __mj."EntityField" delf
|
|
641
718
|
WHERE delf."ID" IN (SELECT d.field_id FROM _del_deleted d);
|
|
642
719
|
|
|
720
|
+
DROP TABLE IF EXISTS _del_protected;
|
|
721
|
+
|
|
643
722
|
RETURN QUERY
|
|
644
723
|
SELECT d.field_id, d.entity_id, d.entity_name, d.field_name FROM _del_deleted d;
|
|
645
724
|
|
|
@@ -852,5 +931,118 @@ BEGIN
|
|
|
852
931
|
AND NOT a.attisdropped;
|
|
853
932
|
END;
|
|
854
933
|
$spgetpk$ LANGUAGE plpgsql;
|
|
934
|
+
|
|
935
|
+
-- ----------------------------------------------------------------------------
|
|
936
|
+
-- 9. spRecompileAllViews — the PostgreSQL counterpart of the SQL Server proc
|
|
937
|
+
-- R__RefreshMetadata calls first.
|
|
938
|
+
--
|
|
939
|
+
-- WHAT SQL SERVER DOES AND WHY PG CANNOT. SQL Server caches a view's column
|
|
940
|
+
-- list at create time and sp_refreshview re-resolves it in place, so
|
|
941
|
+
-- spRecompileAllViews can walk the catalog in dependency order and heal
|
|
942
|
+
-- every stale SELECT * view without knowing any view's source. PostgreSQL
|
|
943
|
+
-- freezes a view's targetlist at creation too, but has NO in-place refresh:
|
|
944
|
+
-- CREATE OR REPLACE VIEW may only APPEND columns and must keep the existing
|
|
945
|
+
-- ones identical, and pg_get_viewdef returns the already-expanded
|
|
946
|
+
-- definition — so replaying it re-freezes exactly the same stale list. The
|
|
947
|
+
-- only repair is DROP + CREATE from the ORIGINAL source, which lives in
|
|
948
|
+
-- CodeGen, not in the database.
|
|
949
|
+
--
|
|
950
|
+
-- SO THIS FUNCTION DETECTS, AND SAYS SO. The harm CodeGen's SQL Server side
|
|
951
|
+
-- prevents is not "a view is stale" — it is that a stale view is SILENT until
|
|
952
|
+
-- something reads it and fails with column "X" does not exist, taking
|
|
953
|
+
-- BaseEngine loads and mj sync push down with it. On the migrate-only
|
|
954
|
+
-- deploy path (mj migrate with no mj codegen) nothing on PostgreSQL said
|
|
955
|
+
-- anything at all. This reports every base view whose column list has drifted
|
|
956
|
+
-- from its base table, RAISEs a WARNING per view so a migrate log carries it,
|
|
957
|
+
-- and returns the rows so a caller can act.
|
|
958
|
+
--
|
|
959
|
+
-- THE REPAIR IS mj codegen (or mj codegen with forceRegeneration for a
|
|
960
|
+
-- broad drift): CodeGen holds each view's source and regenerates it.
|
|
961
|
+
--
|
|
962
|
+
-- Scope/parameters mirror the other R__RefreshMetadata routines: exclude
|
|
963
|
+
-- always wins, a NULL/empty include list means every remaining schema.
|
|
964
|
+
-- Virtual entities are skipped (no physical base table to compare against).
|
|
965
|
+
-- ----------------------------------------------------------------------------
|
|
966
|
+
DROP FUNCTION IF EXISTS __mj."spRecompileAllViews"();
|
|
967
|
+
DROP FUNCTION IF EXISTS __mj."spRecompileAllViews"(TEXT);
|
|
968
|
+
DROP FUNCTION IF EXISTS __mj."spRecompileAllViews"(TEXT, TEXT);
|
|
969
|
+
CREATE OR REPLACE FUNCTION __mj."spRecompileAllViews"(
|
|
970
|
+
p_ExcludedSchemaNames TEXT DEFAULT 'sys,information_schema',
|
|
971
|
+
p_IncludedSchemaNames TEXT DEFAULT NULL
|
|
972
|
+
)
|
|
973
|
+
RETURNS TABLE(
|
|
974
|
+
"SchemaName" TEXT,
|
|
975
|
+
"ViewName" TEXT,
|
|
976
|
+
"EntityName" TEXT,
|
|
977
|
+
"MissingColumns" TEXT
|
|
978
|
+
)
|
|
979
|
+
LANGUAGE plpgsql AS $rav$
|
|
980
|
+
DECLARE
|
|
981
|
+
v_has_include BOOLEAN := FALSE;
|
|
982
|
+
v_row RECORD;
|
|
983
|
+
BEGIN
|
|
984
|
+
DROP TABLE IF EXISTS _rav_included;
|
|
985
|
+
CREATE TEMP TABLE _rav_included AS
|
|
986
|
+
SELECT TRIM(s) AS schema_name
|
|
987
|
+
FROM unnest(string_to_array(COALESCE(p_IncludedSchemaNames, ''), ',')) AS s
|
|
988
|
+
WHERE TRIM(s) <> '';
|
|
989
|
+
v_has_include := EXISTS (SELECT 1 FROM _rav_included);
|
|
990
|
+
|
|
991
|
+
DROP TABLE IF EXISTS _rav_drift;
|
|
992
|
+
CREATE TEMP TABLE _rav_drift AS
|
|
993
|
+
WITH scoped AS (
|
|
994
|
+
SELECT
|
|
995
|
+
e."ID" AS entity_id,
|
|
996
|
+
e."Name"::text AS entity_name,
|
|
997
|
+
e."SchemaName"::text AS schema_name,
|
|
998
|
+
e."BaseTable"::text AS base_table,
|
|
999
|
+
e."BaseView"::text AS base_view
|
|
1000
|
+
FROM __mj."vwEntities" e
|
|
1001
|
+
LEFT JOIN unnest(string_to_array(COALESCE(p_ExcludedSchemaNames, ''), ',')) AS ex(v)
|
|
1002
|
+
ON e."SchemaName"::text = TRIM(ex.v)
|
|
1003
|
+
WHERE e."VirtualEntity" = FALSE
|
|
1004
|
+
AND ex.v IS NULL
|
|
1005
|
+
AND COALESCE(e."BaseView", '') <> ''
|
|
1006
|
+
AND (NOT v_has_include OR e."SchemaName"::text IN (SELECT i.schema_name FROM _rav_included i))
|
|
1007
|
+
),
|
|
1008
|
+
resolved AS (
|
|
1009
|
+
SELECT
|
|
1010
|
+
sc.*,
|
|
1011
|
+
bt.oid AS base_table_oid,
|
|
1012
|
+
vw.oid AS view_oid
|
|
1013
|
+
FROM scoped sc
|
|
1014
|
+
JOIN pg_catalog.pg_namespace ns ON ns.nspname = sc.schema_name
|
|
1015
|
+
JOIN pg_catalog.pg_class bt ON bt.relnamespace = ns.oid AND bt.relname = sc.base_table AND bt.relkind IN ('r', 'p', 'f')
|
|
1016
|
+
JOIN pg_catalog.pg_class vw ON vw.relnamespace = ns.oid AND vw.relname = sc.base_view AND vw.relkind IN ('v', 'm')
|
|
1017
|
+
)
|
|
1018
|
+
SELECT
|
|
1019
|
+
r.schema_name,
|
|
1020
|
+
r.base_view AS view_name,
|
|
1021
|
+
r.entity_name,
|
|
1022
|
+
string_agg(bt_a.attname::text, ', ' ORDER BY bt_a.attnum) AS missing_columns
|
|
1023
|
+
FROM resolved r
|
|
1024
|
+
JOIN pg_catalog.pg_attribute bt_a
|
|
1025
|
+
ON bt_a.attrelid = r.base_table_oid AND bt_a.attnum > 0 AND NOT bt_a.attisdropped
|
|
1026
|
+
WHERE NOT EXISTS (
|
|
1027
|
+
SELECT 1 FROM pg_catalog.pg_attribute v_a
|
|
1028
|
+
WHERE v_a.attrelid = r.view_oid AND v_a.attnum > 0 AND NOT v_a.attisdropped
|
|
1029
|
+
AND v_a.attname = bt_a.attname
|
|
1030
|
+
)
|
|
1031
|
+
GROUP BY r.schema_name, r.base_view, r.entity_name;
|
|
1032
|
+
|
|
1033
|
+
FOR v_row IN SELECT * FROM _rav_drift ORDER BY schema_name, view_name LOOP
|
|
1034
|
+
RAISE WARNING 'spRecompileAllViews: base view %.% (entity %) is missing base-table column(s): %. PostgreSQL cannot refresh a view in place, so run mj codegen to regenerate it from source.',
|
|
1035
|
+
v_row.schema_name, v_row.view_name, v_row.entity_name, v_row.missing_columns;
|
|
1036
|
+
END LOOP;
|
|
1037
|
+
|
|
1038
|
+
RETURN QUERY
|
|
1039
|
+
SELECT d.schema_name, d.view_name, d.entity_name, d.missing_columns
|
|
1040
|
+
FROM _rav_drift d
|
|
1041
|
+
ORDER BY d.schema_name, d.view_name;
|
|
1042
|
+
|
|
1043
|
+
DROP TABLE IF EXISTS _rav_drift;
|
|
1044
|
+
DROP TABLE IF EXISTS _rav_included;
|
|
1045
|
+
END;
|
|
1046
|
+
$rav$;
|
|
855
1047
|
`;
|
|
856
1048
|
//# sourceMappingURL=metadataSupportObjects.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadataSupportObjects.js","sourceRoot":"","sources":["../../../../src/Database/providers/postgresql/metadataSupportObjects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,8BAA8B,CAAC,YAAoB;IAC/D,OAAO,4BAA4B,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AACzE,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,8BAA8B,CAAC,YAAoB;IACjE,OAAO,8BAA8B,CAAC,YAAY,CAAC,CAAC;AACtD,CAAC;AACD,MAAM,4BAA4B,GAAW,MAAM,CAAC,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"metadataSupportObjects.js","sourceRoot":"","sources":["../../../../src/Database/providers/postgresql/metadataSupportObjects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,8BAA8B,CAAC,YAAoB;IAC/D,OAAO,4BAA4B,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AACzE,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,8BAA8B,CAAC,YAAoB;IACjE,OAAO,8BAA8B,CAAC,YAAY,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAy/BtD,CAAC"}
|
|
@@ -97,12 +97,24 @@ export declare class SQLServerCodeGenProvider extends CodeGenDatabaseProvider {
|
|
|
97
97
|
* Includes GRANT EXECUTE permissions for authorized roles.
|
|
98
98
|
*/
|
|
99
99
|
generateCRUDCreate(entity: EntityInfo): string;
|
|
100
|
+
/**
|
|
101
|
+
* Builds the post-insert / post-update `SELECT` statement returned by a CRUD stored procedure.
|
|
102
|
+
*
|
|
103
|
+
* - When `entity.SaveReturnMode` is `'full'` (default), queries `SELECT *` (or `SELECT TOP 0 *`)
|
|
104
|
+
* from `[schema].[BaseView]` so calculated and joined columns are returned.
|
|
105
|
+
* - When `entity.SaveReturnMode` is `'datestamps_only'`, queries only the primary key column(s)
|
|
106
|
+
* plus `__mj_CreatedAt` and `__mj_UpdatedAt` (via {@link EntityInfo.DatestampReturnFields})
|
|
107
|
+
* directly from `[schema].[BaseTable]`, avoiding the post-write `BaseView` joins and large
|
|
108
|
+
* payload columns while still returning DB-generated key and timestamp values.
|
|
109
|
+
*/
|
|
110
|
+
protected buildCRUDReturnSelect(entity: EntityInfo, whereClause: string, topZero?: boolean): string;
|
|
100
111
|
/**
|
|
101
112
|
* Generates the `spUpdate` stored procedure for a SQL Server entity. Performs a standard
|
|
102
113
|
* `UPDATE ... SET ... WHERE PK = @PK` and uses `@@ROWCOUNT` to detect whether the row
|
|
103
114
|
* was found: if no rows were updated (e.g., stale PK or concurrent delete), returns an
|
|
104
115
|
* empty result set with the base view's column structure (`SELECT TOP 0 ... WHERE 1=0`);
|
|
105
|
-
* otherwise returns the updated record from the base view
|
|
116
|
+
* otherwise returns the updated record from the base view (or PK + datestamp columns from
|
|
117
|
+
* the base table when `entity.SaveReturnMode === 'datestamps_only'`). Also generates the
|
|
106
118
|
* `__mj_UpdatedAt` timestamp trigger if the entity has that column.
|
|
107
119
|
*/
|
|
108
120
|
generateCRUDUpdate(entity: EntityInfo): string;
|
|
@@ -143,6 +155,12 @@ export declare class SQLServerCodeGenProvider extends CodeGenDatabaseProvider {
|
|
|
143
155
|
*/
|
|
144
156
|
protected isIndexableKeyColumn(f: EntityFieldInfo): boolean;
|
|
145
157
|
protected formatCompositeIndexStatement(entity: EntityInfo, fields: EntityFieldInfo[], indexName: string): string;
|
|
158
|
+
/**
|
|
159
|
+
* True: the `CREATE FULLTEXT INDEX … KEY INDEX <name>` below names the table's unique
|
|
160
|
+
* primary-key index, so CodeGen must resolve that name before the DDL can be composed.
|
|
161
|
+
* See {@link CodeGenDatabaseProvider.FullTextIndexNeedsPrimaryKeyIndexName}.
|
|
162
|
+
*/
|
|
163
|
+
get FullTextIndexNeedsPrimaryKeyIndexName(): boolean;
|
|
146
164
|
/**
|
|
147
165
|
* Generates SQL Server full-text search infrastructure for an entity, conditionally
|
|
148
166
|
* producing up to three components based on entity metadata flags:
|
|
@@ -156,6 +174,14 @@ export declare class SQLServerCodeGenProvider extends CodeGenDatabaseProvider {
|
|
|
156
174
|
*
|
|
157
175
|
* @returns The generated SQL and the resolved function name for permission grants.
|
|
158
176
|
*/
|
|
177
|
+
/**
|
|
178
|
+
* SQL Server charges full-text search through the fulltext population service rather than a
|
|
179
|
+
* trigger: `CREATE FULLTEXT INDEX` puts the table under continuous change tracking, so every
|
|
180
|
+
* INSERT/UPDATE/DELETE that touches an indexed column queues crawl work, and the index itself
|
|
181
|
+
* occupies catalog storage. The generated script also DROPs and RECREATEs the index, which means
|
|
182
|
+
* a full re-crawl of the table each time this entity's SQL is applied.
|
|
183
|
+
*/
|
|
184
|
+
FullTextSearchCostDisclosure(entity: EntityInfo, searchFields: EntityFieldInfo[]): string | null;
|
|
159
185
|
generateFullTextSearch(entity: EntityInfo, searchFields: EntityFieldInfo[], primaryKeyIndexName: string): FullTextSearchResult;
|
|
160
186
|
/**
|
|
161
187
|
* Generates a SQL Server inline table-valued function that resolves the root ancestor ID
|
|
@@ -250,6 +276,10 @@ export declare class SQLServerCodeGenProvider extends CodeGenDatabaseProvider {
|
|
|
250
276
|
*/
|
|
251
277
|
private generateFieldSecurityDenies;
|
|
252
278
|
/** @inheritdoc */
|
|
279
|
+
GenerateViewPermissionsForTarget(entity: EntityInfo, targetSchemaName: string, targetViewName: string): string;
|
|
280
|
+
/** @inheritdoc */
|
|
281
|
+
GenerateDisabledViewRevokePermissionsForTarget(entity: EntityInfo, targetSchemaName: string, targetViewName: string): string;
|
|
282
|
+
/** @inheritdoc */
|
|
253
283
|
generateViewPermissions(entity: EntityInfo): string;
|
|
254
284
|
/**
|
|
255
285
|
* Generates `GRANT EXECUTE` SQL for a CRUD stored procedure, granting permission only
|
|
@@ -296,14 +326,27 @@ export declare class SQLServerCodeGenProvider extends CodeGenDatabaseProvider {
|
|
|
296
326
|
/** @inheritdoc */
|
|
297
327
|
generateAllEntitiesSQLFileHeader(): string;
|
|
298
328
|
/**
|
|
299
|
-
* Formats a
|
|
300
|
-
*
|
|
301
|
-
* `
|
|
302
|
-
* `
|
|
303
|
-
*
|
|
304
|
-
*
|
|
329
|
+
* Formats a column default for embedding in generated SQL. The value is classified by
|
|
330
|
+
* {@link ClassifySQLServerDefaultValue}: literals keep the long-standing quoting rule
|
|
331
|
+
* (`needsQuotes`), inline-safe functions such as `GETUTCDATE()` are emitted verbatim, a
|
|
332
|
+
* bare `NEWSEQUENTIALID()` becomes `NEWID()` (it is legal only in a DEFAULT constraint), and
|
|
333
|
+
* expressions are emitted verbatim rather than string-quoted. Returns `'NULL'` for empty or
|
|
334
|
+
* whitespace-only inputs.
|
|
305
335
|
*/
|
|
306
336
|
formatDefaultValue(defaultValue: string, needsQuotes: boolean): string;
|
|
337
|
+
/**
|
|
338
|
+
* An expression default (`NEXT VALUE FOR`, string concatenation, most function calls) is
|
|
339
|
+
* resolved into its parameter before the INSERT: T-SQL rejects `NEXT VALUE FOR` inside the
|
|
340
|
+
* `ISNULL`/`CASE` wrap the value list otherwise uses (#4000).
|
|
341
|
+
*/
|
|
342
|
+
protected isPreInsertDefault(ef: EntityFieldInfo): boolean;
|
|
343
|
+
/**
|
|
344
|
+
* Emits `IF @P IS NULL SET @P = <expr>;` for every create-routine parameter whose default is an
|
|
345
|
+
* expression. Mirrors the value-list branches of {@link GenerateInsertFieldString}: a NOT NULL
|
|
346
|
+
* uniqueidentifier also treats the empty GUID as "not supplied", and a nullable column skips the
|
|
347
|
+
* default when the caller set its `_Clear` companion.
|
|
348
|
+
*/
|
|
349
|
+
GeneratePreInsertDefaultAssignments(entity: EntityInfo): string;
|
|
307
350
|
/**
|
|
308
351
|
* Builds the four SQL fragments needed to work with an entity's primary key columns
|
|
309
352
|
* in cursor-based cascade operations:
|
|
@@ -339,6 +382,8 @@ export declare class SQLServerCodeGenProvider extends CodeGenDatabaseProvider {
|
|
|
339
382
|
*/
|
|
340
383
|
getCompositeUniqueConstraintCheckSQL(schema: string, tableName: string, columnName: string): string;
|
|
341
384
|
/** @inheritdoc */
|
|
385
|
+
GetUniqueIndexMembershipSQL(schema: string, tableName: string, columnName: string): string | null;
|
|
386
|
+
/** @inheritdoc */
|
|
342
387
|
getForeignKeyIndexExistsSQL(schema: string, tableName: string, indexName: string): string;
|
|
343
388
|
/**
|
|
344
389
|
* Builds a SQL Server `EXEC` statement for invoking a stored procedure. When `paramNames`
|
|
@@ -390,6 +435,8 @@ export declare class SQLServerCodeGenProvider extends CodeGenDatabaseProvider {
|
|
|
390
435
|
/** @inheritdoc */
|
|
391
436
|
generateViewRefreshSQL(schema: string, viewName: string): string;
|
|
392
437
|
/** @inheritdoc */
|
|
438
|
+
getViewDependenciesSQL(schema: string, viewName: string): string;
|
|
439
|
+
/** @inheritdoc */
|
|
393
440
|
generateIfViewExistsSQL(schema: string, viewName: string, innerSQL: string): string;
|
|
394
441
|
/** @inheritdoc */
|
|
395
442
|
generateViewTestQuerySQL(schema: string, viewName: string): string;
|
|
@@ -459,13 +506,16 @@ export declare class SQLServerCodeGenProvider extends CodeGenDatabaseProvider {
|
|
|
459
506
|
/** @inheritdoc */
|
|
460
507
|
getFixVirtualFieldNullabilitySQL(_mjCoreSchema: string): string;
|
|
461
508
|
/**
|
|
462
|
-
* Executes a SQL file against SQL Server
|
|
463
|
-
*
|
|
464
|
-
*
|
|
465
|
-
*
|
|
466
|
-
*
|
|
467
|
-
*
|
|
509
|
+
* Executes a SQL file against SQL Server over the shared in-process mssql pool, one `GO`
|
|
510
|
+
* batch at a time. Every batch runs even after one fails, so a single run reports the
|
|
511
|
+
* complete set of broken objects; each failure is logged as an error naming the object the
|
|
512
|
+
* batch acts on (`CREATE PROCEDURE [s].[spX]`, `GRANT ON [s].[vwX]`). Returns `false` when
|
|
513
|
+
* any batch failed or the file could not be read, `true` otherwise. A failed batch used to be
|
|
514
|
+
* logged as a warning with the file still reported as successful, which hid procedures that
|
|
515
|
+
* had been dropped and never recreated (#4000).
|
|
468
516
|
*/
|
|
469
517
|
executeSQLFileViaShell(filePath: string): Promise<boolean>;
|
|
518
|
+
/** @inheritdoc */
|
|
519
|
+
NormalizeRoutineDefinitionForComparison(definition: string): string | null;
|
|
470
520
|
}
|
|
471
521
|
//# sourceMappingURL=SQLServerCodeGenProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SQLServerCodeGenProvider.d.ts","sourceRoot":"","sources":["../../../../src/Database/providers/sqlserver/SQLServerCodeGenProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAA0C,MAAM,sBAAsB,CAAC;AAC3G,OAAO,EACH,uBAAuB,EACvB,QAAQ,EACR,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"SQLServerCodeGenProvider.d.ts","sourceRoot":"","sources":["../../../../src/Database/providers/sqlserver/SQLServerCodeGenProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAA0C,MAAM,sBAAsB,CAAC;AAC3G,OA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