You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optional directive that get's the database's post-restore name returned, instead of it's pre-restore name. Useful for working with Savepoints with database renames.
Usage
Given the following operation:
// Name changeconstsavepoint=awaitclient.alterDatabase('database_1',(schema)=>schema.name('database_1_new'),{returning: 'savepoint'});
Get the database's pre- and post-restore names:
// The database's active, pre-restore nameconsole.log(savepoint.name());// database_1_new// The database's post-restore nameconsole.log(savepoint.name(true));// database_1
Given the following rollback:
constsavepoint=awaitsavepoint.rollback();
Get the database's pre- and post-restore names:
// The database's active, pre-restore nameconsole.log(savepoint.name());// database_1// The database's post-restore nameconsole.log(savepoint.name(true));// database_1_new