refactor:dialect.nosql=>driver.databaseEngineTypes

This commit is contained in:
Jan Prochazka
2022-03-05 12:12:02 +01:00
parent 8692283cb8
commit d7a2bf3ac0
15 changed files with 50 additions and 25 deletions

View File

@@ -158,7 +158,7 @@ registerCommand({
toolbarName: 'New table',
testEnabled: () => {
const driver = findEngineDriver(get(currentDatabase)?.connection, getExtensions());
return !!get(currentDatabase) && !driver?.dialect?.nosql;
return !!get(currentDatabase) && driver?.databaseEngineTypes?.includes('sql');
},
onClick: () => {
const $currentDatabase = get(currentDatabase);
@@ -196,7 +196,7 @@ registerCommand({
toolbarName: 'New collection',
testEnabled: () => {
const driver = findEngineDriver(get(currentDatabase)?.connection, getExtensions());
return !!get(currentDatabase) && driver?.dialect?.nosql;
return !!get(currentDatabase) && driver?.databaseEngineTypes?.includes('document');
},
onClick: async () => {
const $currentDatabase = get(currentDatabase);