drop database #384

This commit is contained in:
Jan Prochazka
2022-09-29 09:58:35 +02:00
parent 04d39f6646
commit 833f029ab5
9 changed files with 62 additions and 7 deletions

View File

@@ -152,4 +152,13 @@ module.exports = {
opened.subprocess.send({ msgtype: 'createDatabase', name });
return { status: 'ok' };
},
dropDatabase_meta: true,
async dropDatabase({ conid, name }, req) {
testConnectionPermission(conid, req);
const opened = await this.ensureOpened(conid);
if (opened.connection.isReadOnly) return false;
opened.subprocess.send({ msgtype: 'dropDatabase', name });
return { status: 'ok' };
},
};