TDAUpdateRule
Overview
The TDAUpdateRule class represents an individual update rule defined in a schema.
Update rules are used to define the order in which updates to particular data tables are performed, for example to ensure that detail data is inserted after, but deleted before changes to the master record.
You will usually not create instances of this class directly, but define update rules in Schema Modeler or access them through the UpdateRules property of the TDASchema component.
Location
- Unit: uDAUpdateRule.pas
- Ancestry: TCollectionItem | TDAUpdateRule
constructor Create override
Creates a new instance.
constructor Create(aCollection: TCollection)
Parameters:
- aCollection: owner collection.
Assign override
Copies data from a given source.
procedure Assign(aSource: TPersistent)
Parameters:
- aSource: Instance whose properties will be copied
ChangeTypes
Kind of changes (Insert/Update/Delete)
property ChangeTypes: TDAChangeTypes read
DatasetName
Defines the name of the dataset (or data table) that this update rule applies to.
property DatasetName: string read write
Description
Returns the rule's description.
property Description: string read write
DoDelete
Indicates whether Deletes should be performed as part of this rule, or not.
property DoDelete: Boolean read write
DoInsert
Indicates whether Inserts should be performed as part of this rule, or not.
property DoInsert: Boolean read write
DoUpdate
Indicates whether Updates should be performed as part of this rule, or not.
property DoUpdate: Boolean read write
FailureBehavior
Manages how Data Abstract behaves when an error is encountered while processing updates.
- An exception will be raised, and the entire update process will be aborted.
- The error will be logged to be sent back to the client, and processing for the remaining changes will continue.
- The error will be ignored to be sent back to the client, and processing for the remaining changes will continue.The client will not be notified of the failed update.
property FailureBehavior: TDAUpdateFailureBehavior read write
GetDisplayName protected override
Returns the name of the update rule as it appears in the collection editor.
function GetDisplayName: string
Name
Sets a human-readable name for the update rule.
property Name: string read write
ChangeTypes
Kind of changes (Insert/Update/Delete)
property ChangeTypes: TDAChangeTypes read
DatasetName
Defines the name of the dataset (or data table) that this update rule applies to.
property DatasetName: string read write
Description
Returns the rule's description.
property Description: string read write
DoDelete
Indicates whether Deletes should be performed as part of this rule, or not.
property DoDelete: Boolean read write
DoInsert
Indicates whether Inserts should be performed as part of this rule, or not.
property DoInsert: Boolean read write
DoUpdate
Indicates whether Updates should be performed as part of this rule, or not.
property DoUpdate: Boolean read write
FailureBehavior
Manages how Data Abstract behaves when an error is encountered while processing updates.
- An exception will be raised, and the entire update process will be aborted.
- The error will be logged to be sent back to the client, and processing for the remaining changes will continue.
- The error will be ignored to be sent back to the client, and processing for the remaining changes will continue.The client will not be notified of the failed update.
property FailureBehavior: TDAUpdateFailureBehavior read write
Name
Sets a human-readable name for the update rule.
property Name: string read write
constructor Create override
Creates a new instance.
constructor Create(aCollection: TCollection)
Parameters:
- aCollection: owner collection.
Assign override
Copies data from a given source.
procedure Assign(aSource: TPersistent)
Parameters:
- aSource: Instance whose properties will be copied
GetDisplayName protected override
Returns the name of the update rule as it appears in the collection editor.
function GetDisplayName: string