Skip to content

Commit

Permalink
fix(cli): ignore error for PROMPT_SQL query (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
sundy-li authored Aug 23, 2023
1 parent c1dc353 commit 362518c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cli/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ impl Session {
println!("Connected to {}", version);
println!();

let mut rows = conn.query_iter(PROMPT_SQL).await.unwrap();
while let Some(row) = rows.next().await {
let name: (String,) = row.unwrap().try_into().unwrap();
keywords.push(name.0);
let rows = conn.query_iter(PROMPT_SQL).await;
if let Ok(mut rows) = rows {
while let Some(row) = rows.next().await {
let name: (String,) = row.unwrap().try_into().unwrap();
keywords.push(name.0);
}
}
}

Expand Down

0 comments on commit 362518c

Please sign in to comment.