|
|
@@ -58,7 +58,11 @@ class MySqlDatabaseHelper:
|
|
|
query = text(query)
|
|
|
|
|
|
# 获取总行数
|
|
|
- total_rows = self.fetch_one(count_query, params)[0]
|
|
|
+ result = self.fetch_one(count_query, params)
|
|
|
+ total_rows = result[0] if result is not None else 0
|
|
|
+
|
|
|
+ if total_rows == 0:
|
|
|
+ return data
|
|
|
|
|
|
page = 1
|
|
|
with tqdm(total=total_rows, desc="Loading data", unit="rows") as pbar:
|