-
-
Notifications
You must be signed in to change notification settings - Fork 2
client.renameDatabase()
Oxford Harrison edited this page Nov 10, 2024
·
5 revisions
Programmatically perform a RENAME DATABASE
operation.
client.renameDatabase(
fromName: string,
toName: string,
options?: QueryOptions
): Promise<Savepoint | boolean>;
Param | Description |
---|---|
fromName |
An existing database name. |
toName |
The intended new database name. |
options |
Standard QueryOptions . |
- A Savepoint instance (See ➞
Savepoint
) or the booleantrue
when savepoint creation has been disabled viaoptions.noCreateSavepoint
; (Compare ➞ Query Return Value)
Rename a database:
const savepoint = await client.renameDatabase(
'database_1',
'database_1_new',
{ desc: 'Just testing database rename' }
);