From f59cb6f53cf4336f71892b590cbf97cac5c776b1 Mon Sep 17 00:00:00 2001 From: necessarylion Date: Sun, 8 Nov 2026 08:36:36 +0700 Subject: [PATCH] Show only the query history of the open database The history list in the Query tab showed queries from all databases. Each entry now saves a key of its database (driver, host, port and database, or the file path for SQLite). The list, the count and Clear use only the entries of the database open in the tab. The list follows a switch of database. Each database keeps up to 200 entries. All databases together keep up to 2000. Old entries were saved without a database, so they are dropped. --- src/components/QueryHistoryList.vue | 20 ++-- src/components/QueryView.vue | 10 +- src/constants/history.ts | 5 +- src/services/QueryHistory.ts | 67 ++++++++++-- tests/QueryHistory.test.ts | 152 ++++++++++++++++++++++------ 5 files changed, 206 insertions(+), 48 deletions(-) diff --git a/src/components/QueryHistoryList.vue b/src/components/QueryHistoryList.vue index 9ba6823..59c279d 100644 --- a/src/components/QueryHistoryList.vue +++ b/src/components/QueryHistoryList.vue @@ -1,10 +1,18 @@