Skip to content

Commit 362518c

Browse files
authored
fix(cli): ignore error for PROMPT_SQL query (#191)
1 parent c1dc353 commit 362518c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

cli/src/session.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ impl Session {
6666
println!("Connected to {}", version);
6767
println!();
6868

69-
let mut rows = conn.query_iter(PROMPT_SQL).await.unwrap();
70-
while let Some(row) = rows.next().await {
71-
let name: (String,) = row.unwrap().try_into().unwrap();
72-
keywords.push(name.0);
69+
let rows = conn.query_iter(PROMPT_SQL).await;
70+
if let Ok(mut rows) = rows {
71+
while let Some(row) = rows.next().await {
72+
let name: (String,) = row.unwrap().try_into().unwrap();
73+
keywords.push(name.0);
74+
}
7375
}
7476
}
7577

0 commit comments

Comments
 (0)