@memberjunction/core-entities 2.76.0 → 2.77.0
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.
|
@@ -21755,6 +21755,41 @@ let ConversationDetailEntity = class ConversationDetailEntity extends core_1.Bas
|
|
|
21755
21755
|
return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
|
|
21756
21756
|
}
|
|
21757
21757
|
/**
|
|
21758
|
+
* Conversation Details - Delete method override to wrap in transaction since CascadeDeletes is true.
|
|
21759
|
+
* Wrapping in a transaction ensures that all cascade delete operations are handled atomically.
|
|
21760
|
+
* @public
|
|
21761
|
+
* @method
|
|
21762
|
+
* @override
|
|
21763
|
+
* @memberof ConversationDetailEntity
|
|
21764
|
+
* @returns {Promise<boolean>} - true if successful, false otherwise
|
|
21765
|
+
*/
|
|
21766
|
+
async Delete(options) {
|
|
21767
|
+
if (core_1.Metadata.Provider.ProviderType === core_1.ProviderType.Database) {
|
|
21768
|
+
// For database providers, use the transaction methods directly
|
|
21769
|
+
const provider = core_1.Metadata.Provider;
|
|
21770
|
+
try {
|
|
21771
|
+
await provider.BeginTransaction();
|
|
21772
|
+
const result = await super.Delete(options);
|
|
21773
|
+
if (result) {
|
|
21774
|
+
await provider.CommitTransaction();
|
|
21775
|
+
return true;
|
|
21776
|
+
}
|
|
21777
|
+
else {
|
|
21778
|
+
await provider.RollbackTransaction();
|
|
21779
|
+
return false;
|
|
21780
|
+
}
|
|
21781
|
+
}
|
|
21782
|
+
catch (error) {
|
|
21783
|
+
await provider.RollbackTransaction();
|
|
21784
|
+
throw error;
|
|
21785
|
+
}
|
|
21786
|
+
}
|
|
21787
|
+
else {
|
|
21788
|
+
// For network providers, cascading deletes are handled server-side
|
|
21789
|
+
return super.Delete(options);
|
|
21790
|
+
}
|
|
21791
|
+
}
|
|
21792
|
+
/**
|
|
21758
21793
|
* Validate() method override for Conversation Details entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
21759
21794
|
* * UserRating: This rule ensures that the user rating is between 1 and 10, inclusive. Ratings below 1 or above 10 are not allowed.
|
|
21760
21795
|
* @public
|
|
@@ -22043,6 +22078,41 @@ let ConversationEntity = class ConversationEntity extends core_1.BaseEntity {
|
|
|
22043
22078
|
return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
|
|
22044
22079
|
}
|
|
22045
22080
|
/**
|
|
22081
|
+
* Conversations - Delete method override to wrap in transaction since CascadeDeletes is true.
|
|
22082
|
+
* Wrapping in a transaction ensures that all cascade delete operations are handled atomically.
|
|
22083
|
+
* @public
|
|
22084
|
+
* @method
|
|
22085
|
+
* @override
|
|
22086
|
+
* @memberof ConversationEntity
|
|
22087
|
+
* @returns {Promise<boolean>} - true if successful, false otherwise
|
|
22088
|
+
*/
|
|
22089
|
+
async Delete(options) {
|
|
22090
|
+
if (core_1.Metadata.Provider.ProviderType === core_1.ProviderType.Database) {
|
|
22091
|
+
// For database providers, use the transaction methods directly
|
|
22092
|
+
const provider = core_1.Metadata.Provider;
|
|
22093
|
+
try {
|
|
22094
|
+
await provider.BeginTransaction();
|
|
22095
|
+
const result = await super.Delete(options);
|
|
22096
|
+
if (result) {
|
|
22097
|
+
await provider.CommitTransaction();
|
|
22098
|
+
return true;
|
|
22099
|
+
}
|
|
22100
|
+
else {
|
|
22101
|
+
await provider.RollbackTransaction();
|
|
22102
|
+
return false;
|
|
22103
|
+
}
|
|
22104
|
+
}
|
|
22105
|
+
catch (error) {
|
|
22106
|
+
await provider.RollbackTransaction();
|
|
22107
|
+
throw error;
|
|
22108
|
+
}
|
|
22109
|
+
}
|
|
22110
|
+
else {
|
|
22111
|
+
// For network providers, cascading deletes are handled server-side
|
|
22112
|
+
return super.Delete(options);
|
|
22113
|
+
}
|
|
22114
|
+
}
|
|
22115
|
+
/**
|
|
22046
22116
|
* * Field Name: ID
|
|
22047
22117
|
* * Display Name: ID
|
|
22048
22118
|
* * SQL Data Type: uniqueidentifier
|
|
@@ -35420,6 +35490,41 @@ let ConversationArtifactVersionEntity = class ConversationArtifactVersionEntity
|
|
|
35420
35490
|
return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
|
|
35421
35491
|
}
|
|
35422
35492
|
/**
|
|
35493
|
+
* MJ: Conversation Artifact Versions - Delete method override to wrap in transaction since CascadeDeletes is true.
|
|
35494
|
+
* Wrapping in a transaction ensures that all cascade delete operations are handled atomically.
|
|
35495
|
+
* @public
|
|
35496
|
+
* @method
|
|
35497
|
+
* @override
|
|
35498
|
+
* @memberof ConversationArtifactVersionEntity
|
|
35499
|
+
* @returns {Promise<boolean>} - true if successful, false otherwise
|
|
35500
|
+
*/
|
|
35501
|
+
async Delete(options) {
|
|
35502
|
+
if (core_1.Metadata.Provider.ProviderType === core_1.ProviderType.Database) {
|
|
35503
|
+
// For database providers, use the transaction methods directly
|
|
35504
|
+
const provider = core_1.Metadata.Provider;
|
|
35505
|
+
try {
|
|
35506
|
+
await provider.BeginTransaction();
|
|
35507
|
+
const result = await super.Delete(options);
|
|
35508
|
+
if (result) {
|
|
35509
|
+
await provider.CommitTransaction();
|
|
35510
|
+
return true;
|
|
35511
|
+
}
|
|
35512
|
+
else {
|
|
35513
|
+
await provider.RollbackTransaction();
|
|
35514
|
+
return false;
|
|
35515
|
+
}
|
|
35516
|
+
}
|
|
35517
|
+
catch (error) {
|
|
35518
|
+
await provider.RollbackTransaction();
|
|
35519
|
+
throw error;
|
|
35520
|
+
}
|
|
35521
|
+
}
|
|
35522
|
+
else {
|
|
35523
|
+
// For network providers, cascading deletes are handled server-side
|
|
35524
|
+
return super.Delete(options);
|
|
35525
|
+
}
|
|
35526
|
+
}
|
|
35527
|
+
/**
|
|
35423
35528
|
* Validate() method override for MJ: Conversation Artifact Versions entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
35424
35529
|
* * Version: This rule ensures that the version number must be greater than zero.
|
|
35425
35530
|
* @public
|
|
@@ -35575,6 +35680,41 @@ let ConversationArtifactEntity = class ConversationArtifactEntity extends core_1
|
|
|
35575
35680
|
return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
|
|
35576
35681
|
}
|
|
35577
35682
|
/**
|
|
35683
|
+
* MJ: Conversation Artifacts - Delete method override to wrap in transaction since CascadeDeletes is true.
|
|
35684
|
+
* Wrapping in a transaction ensures that all cascade delete operations are handled atomically.
|
|
35685
|
+
* @public
|
|
35686
|
+
* @method
|
|
35687
|
+
* @override
|
|
35688
|
+
* @memberof ConversationArtifactEntity
|
|
35689
|
+
* @returns {Promise<boolean>} - true if successful, false otherwise
|
|
35690
|
+
*/
|
|
35691
|
+
async Delete(options) {
|
|
35692
|
+
if (core_1.Metadata.Provider.ProviderType === core_1.ProviderType.Database) {
|
|
35693
|
+
// For database providers, use the transaction methods directly
|
|
35694
|
+
const provider = core_1.Metadata.Provider;
|
|
35695
|
+
try {
|
|
35696
|
+
await provider.BeginTransaction();
|
|
35697
|
+
const result = await super.Delete(options);
|
|
35698
|
+
if (result) {
|
|
35699
|
+
await provider.CommitTransaction();
|
|
35700
|
+
return true;
|
|
35701
|
+
}
|
|
35702
|
+
else {
|
|
35703
|
+
await provider.RollbackTransaction();
|
|
35704
|
+
return false;
|
|
35705
|
+
}
|
|
35706
|
+
}
|
|
35707
|
+
catch (error) {
|
|
35708
|
+
await provider.RollbackTransaction();
|
|
35709
|
+
throw error;
|
|
35710
|
+
}
|
|
35711
|
+
}
|
|
35712
|
+
else {
|
|
35713
|
+
// For network providers, cascading deletes are handled server-side
|
|
35714
|
+
return super.Delete(options);
|
|
35715
|
+
}
|
|
35716
|
+
}
|
|
35717
|
+
/**
|
|
35578
35718
|
* * Field Name: ID
|
|
35579
35719
|
* * Display Name: ID
|
|
35580
35720
|
* * SQL Data Type: uniqueidentifier
|
|
@@ -39651,6 +39791,41 @@ let ReportEntity = class ReportEntity extends core_1.BaseEntity {
|
|
|
39651
39791
|
return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
|
|
39652
39792
|
}
|
|
39653
39793
|
/**
|
|
39794
|
+
* Reports - Delete method override to wrap in transaction since CascadeDeletes is true.
|
|
39795
|
+
* Wrapping in a transaction ensures that all cascade delete operations are handled atomically.
|
|
39796
|
+
* @public
|
|
39797
|
+
* @method
|
|
39798
|
+
* @override
|
|
39799
|
+
* @memberof ReportEntity
|
|
39800
|
+
* @returns {Promise<boolean>} - true if successful, false otherwise
|
|
39801
|
+
*/
|
|
39802
|
+
async Delete(options) {
|
|
39803
|
+
if (core_1.Metadata.Provider.ProviderType === core_1.ProviderType.Database) {
|
|
39804
|
+
// For database providers, use the transaction methods directly
|
|
39805
|
+
const provider = core_1.Metadata.Provider;
|
|
39806
|
+
try {
|
|
39807
|
+
await provider.BeginTransaction();
|
|
39808
|
+
const result = await super.Delete(options);
|
|
39809
|
+
if (result) {
|
|
39810
|
+
await provider.CommitTransaction();
|
|
39811
|
+
return true;
|
|
39812
|
+
}
|
|
39813
|
+
else {
|
|
39814
|
+
await provider.RollbackTransaction();
|
|
39815
|
+
return false;
|
|
39816
|
+
}
|
|
39817
|
+
}
|
|
39818
|
+
catch (error) {
|
|
39819
|
+
await provider.RollbackTransaction();
|
|
39820
|
+
throw error;
|
|
39821
|
+
}
|
|
39822
|
+
}
|
|
39823
|
+
else {
|
|
39824
|
+
// For network providers, cascading deletes are handled server-side
|
|
39825
|
+
return super.Delete(options);
|
|
39826
|
+
}
|
|
39827
|
+
}
|
|
39828
|
+
/**
|
|
39654
39829
|
* * Field Name: ID
|
|
39655
39830
|
* * Display Name: ID
|
|
39656
39831
|
* * SQL Data Type: uniqueidentifier
|