-
Notifications
You must be signed in to change notification settings - Fork 137
Closed
Description
Negative numbers are tokenized as [Minus, Number] tokens, which is an issue because
get_column_names_from_insert_into_query and get_column_values_from_insert_into_query
start returning different number elements.
These 2 must always match on number of elements, or panic, as otherwise:
for (i, column_name) in column_names.iter().enumerate() {
let value_token = column_values.get(i).unwrap();is wrong.
I have a patch for this that needs some work, as it affects both tokenezation and parsing.
Simple query that failed for us:
INSERT INTO `test` (`count`) VALUES (-1);The #167 pull request is trying to address this by gracefully handling mismatch, but unless I forget some niche sql features, they must always match when columns are explicitly provided.
The #110 (2) is most likely result of mismatching columns vs values.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels