Skip to content

Commit ed63464

Browse files
committed
fix: empty result loader
1 parent 7107ce8 commit ed63464

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src-tauri/src/postgres.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ pub async fn get_sql_result(
6666
let client = client.as_ref().unwrap();
6767

6868
let rows = client.query(sql.as_str(), &[]).await.unwrap();
69+
70+
if rows.is_empty() {
71+
return Ok((Vec::new(), Vec::new()));
72+
}
73+
6974
let columns = rows
7075
.first()
7176
.unwrap()

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"package": {
1010
"productName": "Rust SQL GUI",
11-
"version": "0.0.1"
11+
"version": "1.0.0.alpha"
1212
},
1313
"tauri": {
1414
"allowlist": {

0 commit comments

Comments
 (0)