xaResumePrepared method
Resume a previously prepared XID — rebuilds an xa_id handle
for crash-recovery scenarios. Returns the xa_id on success,
0 on failure.
Implementation
int xaResumePrepared({
required int connectionId,
required int formatId,
required Uint8List gtrid,
required Uint8List bqual,
}) {
final gtridPtr = _allocBytes(gtrid);
final bqualPtr = _allocBytes(bqual);
try {
return _bindings.odbc_xa_resume_prepared(
connectionId,
formatId,
gtridPtr,
gtrid.length,
bqualPtr,
bqual.length,
);
} finally {
if (gtridPtr.address != 0) calloc.free(gtridPtr);
if (bqualPtr.address != 0) calloc.free(bqualPtr);
}
}