Skip to content

savepoint.rollbackClientID()

Oxford Harrison edited this page Nov 15, 2024 · 1 revision

DOCSAPISavepoint API


Get the Savepoint's rollback client ID. This returns the identifier (ClientOptions.clientID) associated with the Linked QL client of last rollback operation (savepoint.rollback()).

See related ➞ savepoint.commitClientID()

Syntax

savepoint.rollbackClientID(): string;

Usage

// Rollback savepoint
const savepoint = await client.database('database_1').savepoint();
await savepoint.rollback({
    desc: 'Changes no more necessary',
});
// Who rolled back savepoint?
const savepoint = await client.database('database_1').savepoint({ lookAhead: true });
console.log(savepoint.rollbackClientID()); // '[email protected]'
Clone this wiki locally