appsignal / sql_lexer

Rust library to lex and sanitize SQL
Apache License 2.0
20 stars 2 forks source link

Add support for reversed arguments in comparison operators #14

Closed matsimitsu closed 3 years ago

matsimitsu commented 6 years ago

Works:

SELECT `posts`.* FROM `posts` WHERE (created_at >= \'2016-01-10 13:34:46.647328\' AND updated_at <= \'2016-01-10 13:34:46.647328\')

Doesnt work:

SELECT `posts`.* FROM `posts` WHERE (\'2016-01-10 13:34:46.647328\' >= created_at AND \'2016-01-10 13:34:46.647328\' <= updated_at)"
matsimitsu commented 6 years ago

Added a few println! to make clear what's happening with each token/state

tombruijn commented 6 years ago

@thijsc are you actively working on this? (since you're assigned) or can this be moved to Waiting for now?

tombruijn commented 5 years ago

We should check if there's another library that does this and does it better. If so, we can replace it with such a library

backlog-helper[bot] commented 3 years ago

While performing the daily checks some issues were found with this Pull Request.


New issue guide | Backlog management | Rules | Feedback

luismiramirez commented 3 years ago

@matsimitsu Fix on https://github.com/appsignal/sql_lexer/pull/25