3.13 GET_BEFORE_AFTER_IND
Valid For
Extract and Replicat
Description
Use the GET_BEFORE_AFTER_IND
function to determine whether a record is a before image or an after image of the database operation. INSERT
s are after images, DELETE
s are before images, and UPDATE
s can be either before or after images (see the Extract and Replicat parameters GETUPDATEBEFORES
and GETUPDATEAFTERS
). If the before images of UPDATE
operations are being extracted, the before images precede the after images within the same update.
Syntax
#include "usrdecs.h" short result_code; record_def record; ERCALLBACK (GET_BEFORE_AFTER_IND, &record, &result_code);
Buffer
typedef struct { char *table_name; char *buffer; long length; char before_after_ind; short io_type; short record_type; short transaction_ind; int64_t timestamp; exit_ts_str io_datetime; short mapped; short source_or_target; /* Version 2 CALLBACK_STRUCT_VERSION */ char requesting_before_after_ind; } record_def;
Input
None
Output
Return Values
EXIT_FN_RET_INVALID_CONTEXT EXIT_FN_RET_OK
Parent topic: User Exit Functions