Skip to content

Commit 3eeb0ef

Browse files
Merge pull request #283 from QueryaHub/issue/271-app-shutdown-sqlite
fix(core): disconnect SQLite service inside disconnectAllExternalServices on app shutdown
2 parents 18296ec + f98ba1f commit 3eeb0ef

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎lib/app/app_shutdown.dart‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@ import 'package:querya_desktop/core/database/mongodb_service.dart';
22
import 'package:querya_desktop/core/database/mysql_service.dart';
33
import 'package:querya_desktop/core/database/postgres_service.dart';
44
import 'package:querya_desktop/core/database/redis_service.dart';
5+
import 'package:querya_desktop/core/database/sqlite_service.dart';
56

67
/// Disconnects all pooled / cached client connections (PostgreSQL pool, MySQL,
7-
/// Mongo, Redis). Safe to call when no connections exist.
8+
/// Mongo, Redis, SQLite). Safe to call when no connections exist.
89
Future<void> disconnectAllExternalServices() async {
910
await PostgresService.instance.disconnectAll();
1011
await MysqlService.instance.disconnectAll();
1112
await MongoService.instance.disconnectAll();
1213
await RedisService.instance.disconnectAll();
14+
await SqliteService.instance.disconnectAll();
1315
}
16+

‎lib/features/connections/connections_panel.dart‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,6 @@ class ConnectionsPanelState extends State<ConnectionsPanel> {
353353
_expandedConnections.clear();
354354
});
355355
await disconnectAllExternalServices();
356-
await SqliteService.instance.disconnectAll();
357356
}
358357

359358
Future<void> disconnectOthers(ConnectionRow keepConn) async {

0 commit comments

Comments
 (0)