1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

feat(PostgreSQL): ability to switch the database, closes #432

This commit is contained in:
2023-06-13 18:10:52 +02:00
parent 9d00f58998
commit 89815bf5e7
15 changed files with 15113 additions and 33 deletions

View File

@ -291,6 +291,11 @@ watch(selectedSchema, () => {
changeBreadcrumbs({ schema: selectedSchema.value, query: `Query #${props.tab.index}` });
});
watch(databaseSchemas, () => {
if (!databaseSchemas.value.includes(selectedSchema.value))
selectedSchema.value = null;
}, { deep: true });
const runQuery = async (query: string) => {
if (!query || isQuering.value) return;
isQuering.value = true;
@ -496,9 +501,6 @@ defineExpose({ resizeResults });
query.value = props.tab.content as string;
selectedSchema.value = props.tab.schema || breadcrumbsSchema.value;
if (!databaseSchemas.value.includes(selectedSchema.value))
selectedSchema.value = null;
window.addEventListener('resize', onWindowResize);
const reloadListener = () => {