-
-
Notifications
You must be signed in to change notification settings - Fork 2
savepoint.rollbackDesc()
Oxford Harrison edited this page Nov 15, 2024
·
2 revisions
DOCS • API • Savepoint API
Get the Savepoint's rollback description. This returns the description originally passed along with last rollback operation (savepoint.rollback()
).
See related ➞
savepoint.commitDesc()
savepoint.rollbackDesc(): string;
// Rollback savepoint
const savepoint = await client.database('database_1').savepoint();
await savepoint.rollback({
desc: 'Changes no more necessary'
});
// Why was savepoint rolled back?
const savepoint = await client.database('database_1').savepoint({ lookAhead: true });
console.log(savepoint.rollbackDesc()); // 'Changes no more necessary'