Skip to content

savepoint.rollbackDate()

Oxford Harrison edited this page Nov 15, 2024 · 2 revisions

DOCSAPISavepoint API


Get the Savepoint's rollback date. This returns the data and time of last rollback operation (savepoint.rollback()).

See related ➞ savepoint.commitDate()

Syntax

savepoint.rollbackDate(): Date;

Usage

// Rollback savepoint
const savepoint = await client.database('database_1').savepoint();
await savepoint.rollback({
    desc: 'Changes no more necessary'
});
// When was savepoint rolled back?
const savepoint = await client.database('database_1').savepoint({ lookAhead: true });
console.log(savepoint.rollbackDate()); // 2024-07-17T22:40:56.786Z
Clone this wiki locally