|
Options |
Name |
Purpose |
|
|
cachePolicy ()
|
|
|
|
LOGICAL ChangeBitSet (raw, integer)
|
|
|
|
HANDLE CreateChangeBuffer ()
|
/** Returns a buffer handle for a dynamic temp-table that matches
the definition of the change table for a given source table
(without the meta-fields).
This is a convenience method for users to obtain a buffer
match the change table for use with the FetchChangeRecord() methods.
Multiple calls to this method will return the same buffer handle.
The temp-table is created dynamically inside the CDCTrackingHelper
object. It is deleted when the CDCTrackingHelper object is detroyed. */
|
|
|
DeleteChangeTrackingRecord ()
|
/** Deletes the _Cdc-Change-Tracking record currently in the buffer,
along with any related change table records. This is a convenience
method to allow users to purge the change tracking record and the
change table records for the current _Cdc-Change-Tracking record.
This helps to ensure the referential integrity between the
_Cdc-Change-Tracking and change table records in one convenient
method.
The caller must have a started a transaction to call this method.
No AppError is thrown if there are change table records for the
_Cdc-Change-Tracking record, because the ETL program has most likely
dealt with any discrepancy, and now just wants to purge the data. */
|
|
|
FetchChangeRecord (handle)
|
/** Fetches change table records that match the current
_Cdc-Change-Tracking record, with the same _Operation. It copies
the fields from the change table row into the buffer passed,
based on the field names. The passed buffer should be from a
table with a similar schema to the schema of the change table
(without the meta-fields).
There are between 0 and 2 change table records for each
_Cdc-Change-Tracking/_Operation combination. Typically there are
0 or 1; 2 is the case of a split record. In the case of a split
record, this method copies the change data from both change
table records into the input buffer. If no change table record is
found, this method throws an AppError.
Note that for some CDC operations, there are no change table
records, so users should be careful to call this only when
necessary, and/or catch and handle AppErrors appropriately.
In the case of an UPDATE _Cdc-Change-Tracking record, this method
returns the data from the AFTER change table record.
@param handle Handle to a buffer of a table into which to write the field from the change table record */
|
|
|
FetchChangeRecord (handle, logical)
|
/** This method is similar to FetchChangeRecord(hbuf), but this
overload can look for change table records where the
_Operation reflects a BEFORE record.
In the case of a Level 3 CDC policy, there are two change
tracking records for a _Cdc-Change-Tracking UPDATE record,
a BEFORE and an AFTER record. If the input parameter is TRUE,
this method copies the BEFORE record. If the input parameter is
FALSE, this method copies the AFTER record. If no change table
record is found, this method throws an AppError.
Note that for some CDC operations, there are no change table records,
so users should be careful to call this only when necessary,
and/or catch and handle AppErrors appropriately.
@param handle Handle to a buffer of a table into which to write the field from the change table record
@param logical If the operation is an update, then retrieve the BEFORE record */
|
|
|
LOGICAL FieldChanged (character)
|
/** Returns TRUE if the given fieldname was changed
in the record currently in the _Cdc-Change-Tracking buffer,
according to the _Change-FieldMap.
If the field does not exist in the change table,
an AppError is thrown.
@param character The name of the field to query */
|
|
|
CHARACTER GetChangedFields ()
|
/** Returns an EXTENT of the field names of fields which were flagged as
changed in the _Cdc-Change-Tracking record's _Change-FieldMap.
If there are no changed fields (this is a level 0 CDC policy),
an indeterminate array is returned */
|
|
|
OpenEdge.DataAdmin.Util.CDCOperation GetOperation ()
|
/** Returns a CDCOperation enum value for the operation
in the record currently in the _Cdc-Change-Tracking buffer.
This method provides Enums for all possible _Operation values.
Frequent _Operation values for CREATE, UPDATE and DELETE
have separate methods to provide faster evaluation. */
|
|
|
InternalFetchChangeRecord (handle, integer)
|
/* NOTE: Using an INTEGER parameter for the operation in this
* internal method. The public API never receives a CDCOperation.
* The operation value is either the INTEGER value of
* CDCOperation:BeforeUpdate, or the INTEGER value extracted from
* the _Cdc-Change-Tracking record. The value is then used as an
* INTEGER when building a query. The conversion from an INTEGER
* to a CDCOperation Enum just so it can be converted back to an
* INTEGER is unnecessary processing. There is little advantage of
* type safety if this stays an internal routine. */
|
|
|
LOGICAL InternalIsRecordSplit (integer)
|
/* NOTE: Using an INTEGER parameter for the operation in this
* internal method. The public API never receives a CDCOperation.
* The operation value is either the INTEGER value of
* CDCOperation:BeforeUpdate, or the INTEGER value extracted from
* the _Cdc-Change-Tracking record. The value is then used as an
* INTEGER when building a query. The conversion from an INTEGER
* to a CDCOperation Enum just so it can be converted back to an
* INTEGER is unnecessary processing. There is little advantage of
* type safety if this stays an internal routine. */
|
|
|
LOGICAL IsCreate ()
|
/** Returns whether the _Cdc-Change-Tracking record reflects a CREATE
operation. This method is provided as a an alternative to the
GetOperation method(), as a CREATE operation is a frequent
operation in a change table.
*/
|
|
|
LOGICAL IsDelete ()
|
/** Returns whether the _Cdc-Change-Tracking record reflects a DELETE
operation. This method is provided as a an alternative to the
GetOperation method(), as a DELETE operation is a frequent
operation in a change table.
*/
|
|
|
LOGICAL IsRecordSplit ()
|
/** Returns TRUE if the change details were split between two records,
and FALSE otherwise.
This method looks for change table rows that match the current
_Cdc-Change-Tracking record, using the _Operation from the
_Cdc-Change-Tracking record. If there is more than one change table
record, this means the change details were split between two change
table records.
In the case of a level 3 CDC policy, there may be two change records
for a _Cdc-Change_Tracking record, a BEFORE record and an AFTER record.
This method returns whether the AFTER record was split.
If no change table record exists that matched the _Cdc-Change-Tracking
record, this method will return FALSE.
Note that for some CDC operations, there are no change table records,
so callers should be careful to call this only when necessary,
and/or check for a FALSE return value.
This method is provided so that an ETL program can choose not to call
FetchChangeRecord() if the change table record is not split.
Instead, the ETL program can choose to perform the FIND directly on
the change table. Direct ABL access is faster than calling a method to
potentially rejoin a record if there is no need. */
|
|
|
LOGICAL IsRecordSplit (logical)
|
/** Returns TRUE if the change details were split between two records,
and FALSE otherwise.
This method is similar to the IsRecordSplit() method, but this
overload can loko for change table records where the _Operation
reflects a BEFORE record.
In the case of a Level 3 CDC policy, there are two change tracking
records for a _Cdc-Change-Tracking update record, a BEFORE and an
AFTER record. If the input parameter is TRUE, this method returns
whether the BEFORE record was split. If the input parameter is FALSE,
this method returns whether the AFTER row was split.
If no change table row exists that matches the _Cdc-Change-Tracking
record, this method will return FALSE.
Note that for some CDC operations, there are no change table records,
so users should be careful to call this only when necessary,
and/or check for a FALSE return value.
@param logical If the operation is an update, then retrieve the BEFORE record */
|
|
|
LOGICAL IsUpdate ()
|
/** Returns whether the _Cdc-Change-Tracking record reflects an UPDATE
operation. This method is provided as a an alternative to the
GetOperation method(), as an UPDATE operation is a frequent
operation in a change table.
*/
|