From 690cdcb2eb1c7bf514271000c31211d1c0b33e54 Mon Sep 17 00:00:00 2001 From: Fabio Di Stasio Date: Fri, 22 Apr 2022 23:01:30 +0200 Subject: [PATCH 1/2] fix(SQLite): tables with sqlite in name not visible, closes #239 --- src/main/libs/clients/SQLiteClient.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/libs/clients/SQLiteClient.ts b/src/main/libs/clients/SQLiteClient.ts index de7893f9..de0b2627 100644 --- a/src/main/libs/clients/SQLiteClient.ts +++ b/src/main/libs/clients/SQLiteClient.ts @@ -71,7 +71,7 @@ export class SQLiteClient extends AntaresCore { SELECT * FROM "${db.name}".sqlite_master WHERE type IN ('table', 'view') - AND name NOT LIKE 'sqlite_%' + AND name NOT LIKE 'sqlite\\_%' ESCAPE '\\' ORDER BY name `); if (tables.length) { @@ -743,4 +743,12 @@ export class SQLiteClient extends AntaresCore { return result as unknown as T; } + + getVariables (): null[] { + return []; + } + + getCollations (): null[] { + return []; + } } From d61acf8a0009bd44da014c5c1ab91b950297bee7 Mon Sep 17 00:00:00 2001 From: Fabio Di Stasio Date: Mon, 25 Apr 2022 17:37:12 +0200 Subject: [PATCH 2/2] refactor(SQLite): improved sqlite window title --- src/renderer/components/TheTitleBar.vue | 2 +- src/renderer/store/modules/connections.store.js | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/renderer/components/TheTitleBar.vue b/src/renderer/components/TheTitleBar.vue index 8480a0ed..05651688 100644 --- a/src/renderer/components/TheTitleBar.vue +++ b/src/renderer/components/TheTitleBar.vue @@ -79,7 +79,7 @@ export default { const connectionName = this.getConnectionName(this.selectedWorkspace); const workspace = this.getWorkspace(this.selectedWorkspace); - const breadcrumbs = Object.values(workspace.breadcrumbs).filter(breadcrumb => breadcrumb); + const breadcrumbs = Object.values(workspace.breadcrumbs).filter(breadcrumb => breadcrumb) || [workspace.client]; return [connectionName, ...breadcrumbs].join(' • '); } diff --git a/src/renderer/store/modules/connections.store.js b/src/renderer/store/modules/connections.store.js index e87c25d3..9756e2f6 100644 --- a/src/renderer/store/modules/connections.store.js +++ b/src/renderer/store/modules/connections.store.js @@ -26,9 +26,9 @@ export default { const connection = state.connections.filter(connection => connection.uid === uid)[0]; let connectionName = ''; - if (connection.name) + if (connection?.name) connectionName = connection.name; - else if (connection.ask) + else if (connection?.ask) connectionName = `${connection.host}:${connection.port}`; else if (connection.databasePath) { let string = connection.databasePath.split(/[/\\]+/).pop(); @@ -38,8 +38,14 @@ export default { connectionName = string; } - else - connectionName = `${connection.user + '@'}${connection.host}:${connection.port}`; + else { + if (connection.user) connectionName += `${connection.user}@`; + + if (connection.host) { + connectionName += connection.host; + if (connection.port) connectionName += `:${connection.port}`; + } + } return connectionName; }