fixed db url handling

This commit is contained in:
SPRINX0\prochazka
2024-09-02 10:12:03 +02:00
parent ff8a5f1658
commit 2f42319d2b
2 changed files with 15 additions and 8 deletions

View File

@@ -12,6 +12,9 @@ function getConnectionLabelCore(connection, { allowExplicitDatabase = true } = {
if (connection.displayName) {
return connection.displayName;
}
if (connection.useDatabaseUrl) {
return `${connection.databaseUrl}`;
}
if (connection.singleDatabase && connection.server && allowExplicitDatabase && connection.defaultDatabase) {
return `${connection.defaultDatabase} on ${connection.server}`;
}
@@ -24,9 +27,6 @@ function getConnectionLabelCore(connection, { allowExplicitDatabase = true } = {
if (connection.singleDatabase && connection.defaultDatabase) {
return `${connection.defaultDatabase}`;
}
if (connection.useDatabaseUrl) {
return `${connection.databaseUrl}`;
}
return '';
}