mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
create database - support nosql
This commit is contained in:
parent
6af21b8bae
commit
a5d37eb528
@ -71,7 +71,11 @@ async function handleCreateDatabase({ name }) {
|
||||
const driver = requireEngineDriver(storedConnection);
|
||||
systemConnection = await connectUtility(driver, storedConnection);
|
||||
console.log(`RUNNING SCRIPT: CREATE DATABASE ${driver.dialect.quoteIdentifier(name)}`);
|
||||
if (driver.createDatabase) {
|
||||
await driver.createDatabase(systemConnection, name);
|
||||
} else {
|
||||
await driver.query(systemConnection, `CREATE DATABASE ${driver.dialect.quoteIdentifier(name)}`);
|
||||
}
|
||||
await handleRefresh();
|
||||
}
|
||||
|
||||
|
1
packages/types/engines.d.ts
vendored
1
packages/types/engines.d.ts
vendored
@ -64,6 +64,7 @@ export interface EngineDriver {
|
||||
readCollection(pool: any, options: ReadCollectionOptions): Promise<any>;
|
||||
updateCollection(pool: any, changeSet: any): Promise<any>;
|
||||
getCollectionUpdateScript(changeSet: any): string;
|
||||
createDatabase(pool: any, name: string): Promise;
|
||||
|
||||
analyserClass?: any;
|
||||
dumperClass?: any;
|
||||
|
Loading…
Reference in New Issue
Block a user