Skip to content

Commit

Permalink
Check for error during insert parse
Browse files Browse the repository at this point in the history
  • Loading branch information
mpchadwick committed Jul 16, 2022
1 parent 4e13946 commit c16d6e1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ func (p LineProcessor) ProcessLine(s string) string {
}

func (p LineProcessor) processInsert(s string) string {
stmt, _ := sqlparser.Parse(s)
stmt, err := sqlparser.Parse(s)
if err != nil {
return s
}
insert, ok := stmt.(*sqlparser.Insert)

// This _shouldn't happen but the statement might not be an Insert
Expand Down

0 comments on commit c16d6e1

Please sign in to comment.