IDADelta
Overview
The IDADelta interface represents a set of changes to be transmitted between client and server. These can be client-side changes that are pending to be applied to the server database, or server-side changes that are being propagated back to the client.
Location
- Unit: uDADelta.pas
- Ancestry: IDADelta
Add (TDADeltaChange) overload
Adds a change to the set of changes.
procedure Add(aChange: TDADeltaChange)
Parameters:
- aChange: given change.
Add (Integer, TDAChangeType, TDAChangeStatus, string): TDADeltaChange overload
Adds a change to the set of changes.
function Add(aRecordID: Integer; aChangeType: TDAChangeType; aStatus: TDAChangeStatus; const aMessage: string): TDADeltaChange
Parameters:
AddFieldName
Adds a new field.
procedure AddFieldName(const aFieldName: string; const aDataType: TDADataType)
Parameters:
- aFieldName: field name
- aDataType: data type
AddKeyFieldName
Adds a new key field.
procedure AddKeyFieldName(const aKeyFieldName: string)
Parameters:
- aKeyFieldName: given key field
AssignDataTable
Sets datatable as owner.
procedure AssignDataTable(aDataTable: TComponent)
Parameters:
- aDataTable: given datatable.
BlockedRecordCount
Returns count of unfinished changes.
property BlockedRecordCount: Integer read
CancelChange
Discards the certain change.
procedure CancelChange(aDataTable: TComponent)
Parameters:
- aDataTable: datatable where changes should be discarded
CancelChangesInAllTables
Discards all changes in all tables.
procedure CancelChangesInAllTables
Changes
Provides access to all the individual changes contained in the delta. The indexer is zero-based and the number of elements is indicated by the Count property.
property Changes[Index: Integer]: TDADeltaChange read
Clear
Clears the delta and discards all the individual changes that it contains.
procedure Clear(DoClearFieldNames: Boolean; DoClearKeyFieldNames: Boolean)
Parameters:
- DoClearFieldNames: remove all fields or not
- DoClearKeyFieldNames: remove all key fields or not
ClearFieldNames
Clears list of fields.
procedure ClearFieldNames
ClearKeyFieldNames
Clears list of key's fields.
procedure ClearKeyFieldNames
Count
Returns the number of Changes contained within the delta.
property Count: Integer read
CurrentChangeID
Gets the ChangeID which the next TDADeltaChange will get when adding a new entry to this TDADelta.
property CurrentChangeID: Integer read
Delete
Deletes certain on the Index change.
procedure Delete(Index: Integer)
Parameters:
- Index: given index
DeltaChangesSorted
Allows to sort delta changes
property DeltaChangesSorted: Boolean read write
EndChange
Ends changes for the specified table and applies updates.
procedure EndChange(aDataTable: TComponent)
Parameters:
- aDataTable: given datatable
EndChangesInAllTables
Ends changes for all table and applies updates.
procedure EndChangesInAllTables
FindChange
Finds the change with given aRecID
function FindChange(aRecID: Integer): TDADeltaChange
Parameters:
- aRecID: record ID
GetCountByStatus
Gives the count of changes with certain status.
function GetCountByStatus(aChangeStatus: TDAChangeStatus): Integer
Parameters:
- aChangeStatus: given status
GetDelta
Returns delta instance
function GetDelta: TDADelta
GetInChange
Checks status of given datatable
function GetInChange(aDataTable: TComponent): Boolean
Parameters:
- aDataTable: given datatable
IndexOf
Returns the position of a aChange in the list.
function IndexOf(aChange: TDADeltaChange): Integer
Parameters:
- aChange: Change whose index will be returned.
IndexOfLoggedField
Returns the position of a logged field in the list.
function IndexOfLoggedField(const aName: string): Integer
Parameters:
- aName: field name
IsCanEditCurrentRow
Indicates whether it is possible to edit a current row in the specified table.
function IsCanEditCurrentRow(aDataTable: TComponent): Boolean
Parameters:
- aDataTable: given datatable
IsNewRecord
Indicates whether the record in question represents a newly inserted record that doesn't exist on the server yet (true) or a changed record that already exists on the server (false). If called without parameter (or with -1), the result value will indicate the status of the current record in the data table associated with the delta (client-side only). If called with a non-negative record id, it will indicate the status of that record.
function IsNewRecord(aRecordID: Integer): Boolean
Parameters:
- aRecordID: record ID
IsNewRecord2
Indicates whether the record in question represents a newly inserted record that doesn't exist on the server yet (true) or a changed record that already exists on the server (false). If called without parameter (or with -1), the result value will indicate the status of the current record in the data table associated with the delta (client-side only). If called with a non-negative record id, it will indicate the status of that record.
function IsNewRecord2(aDataTable: TComponent; aRecordID: Integer): Boolean
Parameters:
- aDataTable: DataTable
- aRecordID: record ID
KeyFieldCount
Indicates the number of fields that comprise the key for this delta.
property KeyFieldCount: Integer read
KeyFieldNames
Lists the names of the fields that comprise the key for this delta. The indexer is zero-based and the number of elements is indicated by the KeyFieldCount property.
property KeyFieldNames[Index: Integer]: string read
LoggedFieldCount
Shows the number of fields that comprise the data for this delta.
property LoggedFieldCount: Integer read
LoggedFieldNames
Holds the names of the fields that comprise the data for this delta. The indexer is zero-based and the number of elements is indicated by the LoggedFieldCount property.
property LoggedFieldNames[Index: Integer]: string read
LoggedFieldTypes
Lists the data types of the fields that comprise the data for this delta. The indexer is zero-based and the number of elements is indicated by the LoggedFieldCount property.
property LoggedFieldTypes[Index: Integer]: TDADataType read write
LogicalName
Defines the name of the logical entity that this delta pertains to. Usually, this will be the name of the data table that changes should be applied to.
property LogicalName: string read write
RemoveChange
Removes a delta change to the list of changes maintained within the delta.
procedure RemoveChange(aChange: TDADeltaChange)
Parameters:
- aChange: given change
RemoveLoggedField (string) overload
Deletes certain logged field.
procedure RemoveLoggedField(AFieldName: string)
Parameters:
- AFieldName: field name
RemoveLoggedField (Integer) overload
Deletes certain logged field.
procedure RemoveLoggedField(Index: Integer)
Parameters:
- Index: index of field
RemoveUnchangedChanges
Removes changes that don't contain any modifications.
procedure RemoveUnchangedChanges
RestoreLastChange
Restores the last change.
procedure RestoreLastChange(aDataTable: TComponent)
Parameters:
- aDataTable: given datatable
StartChange
Starts the Delta for the specified table.
procedure StartChange(aChangeType: TDAChangeType; aDataTable: TComponent)
Parameters:
- aChangeType: required type
- aDataTable: given datatable
BlockedRecordCount
Returns count of unfinished changes.
property BlockedRecordCount: Integer read
Changes
Provides access to all the individual changes contained in the delta. The indexer is zero-based and the number of elements is indicated by the Count property.
property Changes[Index: Integer]: TDADeltaChange read
Count
Returns the number of Changes contained within the delta.
property Count: Integer read
CurrentChangeID
Gets the ChangeID which the next TDADeltaChange will get when adding a new entry to this TDADelta.
property CurrentChangeID: Integer read
DeltaChangesSorted
Allows to sort delta changes
property DeltaChangesSorted: Boolean read write
KeyFieldCount
Indicates the number of fields that comprise the key for this delta.
property KeyFieldCount: Integer read
KeyFieldNames
Lists the names of the fields that comprise the key for this delta. The indexer is zero-based and the number of elements is indicated by the KeyFieldCount property.
property KeyFieldNames[Index: Integer]: string read
LoggedFieldCount
Shows the number of fields that comprise the data for this delta.
property LoggedFieldCount: Integer read
LoggedFieldNames
Holds the names of the fields that comprise the data for this delta. The indexer is zero-based and the number of elements is indicated by the LoggedFieldCount property.
property LoggedFieldNames[Index: Integer]: string read
LoggedFieldTypes
Lists the data types of the fields that comprise the data for this delta. The indexer is zero-based and the number of elements is indicated by the LoggedFieldCount property.
property LoggedFieldTypes[Index: Integer]: TDADataType read write
LogicalName
Defines the name of the logical entity that this delta pertains to. Usually, this will be the name of the data table that changes should be applied to.
property LogicalName: string read write
Add (TDADeltaChange) overload
Adds a change to the set of changes.
procedure Add(aChange: TDADeltaChange)
Parameters:
- aChange: given change.
Add (Integer, TDAChangeType, TDAChangeStatus, string): TDADeltaChange overload
Adds a change to the set of changes.
function Add(aRecordID: Integer; aChangeType: TDAChangeType; aStatus: TDAChangeStatus; const aMessage: string): TDADeltaChange
Parameters:
AddFieldName
Adds a new field.
procedure AddFieldName(const aFieldName: string; const aDataType: TDADataType)
Parameters:
- aFieldName: field name
- aDataType: data type
AddKeyFieldName
Adds a new key field.
procedure AddKeyFieldName(const aKeyFieldName: string)
Parameters:
- aKeyFieldName: given key field
AssignDataTable
Sets datatable as owner.
procedure AssignDataTable(aDataTable: TComponent)
Parameters:
- aDataTable: given datatable.
CancelChange
Discards the certain change.
procedure CancelChange(aDataTable: TComponent)
Parameters:
- aDataTable: datatable where changes should be discarded
CancelChangesInAllTables
Discards all changes in all tables.
procedure CancelChangesInAllTables
Clear
Clears the delta and discards all the individual changes that it contains.
procedure Clear(DoClearFieldNames: Boolean; DoClearKeyFieldNames: Boolean)
Parameters:
- DoClearFieldNames: remove all fields or not
- DoClearKeyFieldNames: remove all key fields or not
ClearFieldNames
Clears list of fields.
procedure ClearFieldNames
ClearKeyFieldNames
Clears list of key's fields.
procedure ClearKeyFieldNames
Delete
Deletes certain on the Index change.
procedure Delete(Index: Integer)
Parameters:
- Index: given index
EndChange
Ends changes for the specified table and applies updates.
procedure EndChange(aDataTable: TComponent)
Parameters:
- aDataTable: given datatable
EndChangesInAllTables
Ends changes for all table and applies updates.
procedure EndChangesInAllTables
FindChange
Finds the change with given aRecID
function FindChange(aRecID: Integer): TDADeltaChange
Parameters:
- aRecID: record ID
GetCountByStatus
Gives the count of changes with certain status.
function GetCountByStatus(aChangeStatus: TDAChangeStatus): Integer
Parameters:
- aChangeStatus: given status
GetDelta
Returns delta instance
function GetDelta: TDADelta
GetInChange
Checks status of given datatable
function GetInChange(aDataTable: TComponent): Boolean
Parameters:
- aDataTable: given datatable
IndexOf
Returns the position of a aChange in the list.
function IndexOf(aChange: TDADeltaChange): Integer
Parameters:
- aChange: Change whose index will be returned.
IndexOfLoggedField
Returns the position of a logged field in the list.
function IndexOfLoggedField(const aName: string): Integer
Parameters:
- aName: field name
IsCanEditCurrentRow
Indicates whether it is possible to edit a current row in the specified table.
function IsCanEditCurrentRow(aDataTable: TComponent): Boolean
Parameters:
- aDataTable: given datatable
IsNewRecord
Indicates whether the record in question represents a newly inserted record that doesn't exist on the server yet (true) or a changed record that already exists on the server (false). If called without parameter (or with -1), the result value will indicate the status of the current record in the data table associated with the delta (client-side only). If called with a non-negative record id, it will indicate the status of that record.
function IsNewRecord(aRecordID: Integer): Boolean
Parameters:
- aRecordID: record ID
IsNewRecord2
Indicates whether the record in question represents a newly inserted record that doesn't exist on the server yet (true) or a changed record that already exists on the server (false). If called without parameter (or with -1), the result value will indicate the status of the current record in the data table associated with the delta (client-side only). If called with a non-negative record id, it will indicate the status of that record.
function IsNewRecord2(aDataTable: TComponent; aRecordID: Integer): Boolean
Parameters:
- aDataTable: DataTable
- aRecordID: record ID
RemoveChange
Removes a delta change to the list of changes maintained within the delta.
procedure RemoveChange(aChange: TDADeltaChange)
Parameters:
- aChange: given change
RemoveLoggedField (string) overload
Deletes certain logged field.
procedure RemoveLoggedField(AFieldName: string)
Parameters:
- AFieldName: field name
RemoveLoggedField (Integer) overload
Deletes certain logged field.
procedure RemoveLoggedField(Index: Integer)
Parameters:
- Index: index of field
RemoveUnchangedChanges
Removes changes that don't contain any modifications.
procedure RemoveUnchangedChanges
RestoreLastChange
Restores the last change.
procedure RestoreLastChange(aDataTable: TComponent)
Parameters:
- aDataTable: given datatable
StartChange
Starts the Delta for the specified table.
procedure StartChange(aChangeType: TDAChangeType; aDataTable: TComponent)
Parameters:
- aChangeType: required type
- aDataTable: given datatable