-
-
Notifications
You must be signed in to change notification settings - Fork 2
client.renameDatabase()
Oxford Harrison edited this page Nov 11, 2024
·
5 revisions
DOCS • API • Client API
Programmatically perform a RENAME DATABASE
operation.
See also ➞ ALTER DATABASE
client.renameDatabase(
fromName: string,
toName: string,
options?: QueryOptions
): Promise<DDLResult>;
Param | Interfaces | Description |
---|---|---|
fromName |
- | An existing database name. |
toName |
- | The intended new database name. |
options |
QueryOptions |
Optional extra parameters for the query. |
Interface | Description |
---|---|
DDLResult | The result type for DDL operations. |
Rename a database:
const savepoint = await client.renameDatabase(
'database_1',
'database_1_new',
{ desc: 'Just testing database rename' }
);