v1.8.53: fix Redis and MariaDB GUI tabs — wrong client API calls

- redis_tab: fix RedisClient constructor (pass server dict, not alias+store)
- redis_tab: add connect() call, add disconnect on server switch
- redis_tab: remove non-existent db= parameter from execute(), use select_db()
- redis_client: add select_db() method for runtime DB switching
- query_tab: fix use_database() → switch_database(), close() → disconnect()
- query_tab: fix execute() → execute_query() with dict unpacking
- query_tab: add missing connect() call after SQLClient creation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chrome-storm-c442
2026-02-25 03:28:12 -05:00
parent 4c7c15e497
commit ac7e174e41
5 changed files with 33 additions and 8 deletions

View File

@@ -173,6 +173,9 @@ class QueryTab(ctk.CTkFrame):
return
client = SQLClient(server)
if not client.connect():
self._schedule(self._set_status, t("query_error") + ": connection failed", error=True)
return
databases = client.list_databases()
def _update():
@@ -198,7 +201,7 @@ class QueryTab(ctk.CTkFrame):
if not self._client:
return
try:
self._client.use_database(db_name)
self._client.switch_database(db_name)
self._set_status(f"Database: {db_name}")
except Exception as exc:
self._set_status(str(exc), error=True)
@@ -206,7 +209,7 @@ class QueryTab(ctk.CTkFrame):
def _disconnect(self):
if self._client:
try:
self._client.close()
self._client.disconnect()
except Exception:
pass
self._client = None
@@ -236,7 +239,9 @@ class QueryTab(ctk.CTkFrame):
"""Background thread: execute SQL, measure time, post results."""
start = time.perf_counter()
try:
columns, rows = self._client.execute(sql)
result = self._client.execute_query(sql)
columns = result["columns"]
rows = result["rows"]
elapsed = time.perf_counter() - start
def _update():