Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andylokandy committed Jul 11, 2024
1 parent 35b5ce2 commit 4d8382b
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions cli/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,17 +351,14 @@ impl Session {
let mut tokenizer = Tokenizer::new(&self.query);

while let Some(Ok(token)) = tokenizer.next() {
match token.kind {
TokenKind::SemiColon => {
// push to current and continue the tokenizer
let (sql, remain) = self.query.split_at(token.span.end as usize);
if !sql.is_empty() {
queries.push(sql.to_string());
}
self.query = remain.to_string();
continue 'Parser;
if let TokenKind::SemiColon = token.kind {
// push to current and continue the tokenizer
let (sql, remain) = self.query.split_at(token.span.end as usize);
if !sql.is_empty() {
queries.push(sql.to_string());
}
_ => {}
self.query = remain.to_string();
continue 'Parser;
}
}
break;
Expand Down

0 comments on commit 4d8382b

Please sign in to comment.