-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for LIKE operator in Condition Parser #10
Comments
Ended up being even simpler, just had to add LIKE to readWord! https://github.com/dsferruzza/simpleSqlParser/blob/master/simpleSqlParser.js#L416 I'll put a PR in and use my branch as the dependency in the meantime. |
Hi! I'm currently working on a v2, because v1 is really hard to maintain. I might work on it tonight, so maybe I'll implement the LIKE. Could you provide me one or several examples of SQL queries using LIKE you would like the parser to be able to parse? |
It looks as though v2 already has support for LIKE (with a cursory inspection) but that isn't the package currently available on npm. Here are a few example queries to illustrate the issue:
LIKE is not recognized as an operator, so you get some weird results. Is v2 stable enough to be used in a corporate environment? If so I can freeze to a commit of V2 instead of continuing to use v1. It definitely looks cleaner than v1, but it's also even larger. Have you considered splitting the project up into multiple files and using a build process such as grunt or gulp to concatenate into a release file for the web? At any rate, I've put in a PR against master that fixes the bug. #11 Please let me know how you'd recommend I proceed. Cheers, Josh. |
This bug also affects IN, I'll add it in. |
v2 is still in development so it's not available on npm yet. Otherwise, v2 seems quite stable to me, which is not hard compared to v1... I don't plan to split into multiple files, but I haven't decided not to. I plan to update the gulp tasks to generate plain and minified releases, including and not including Parsimmon (which is the only runtime dependency). Also, I added |
Really neat project, I keep finding myself implementing pieces and parts of SQL parsers for various projects and finally bit the bullet to look for an existing solution. Overall your project has been working very well! I did just run into an issue while writing test cases for some of my work though -- the LIKE operator is not currently supported. I may take a look at fixing that and putting in a PR, since it's pretty important.
https://github.com/dsferruzza/simpleSqlParser/blob/master/simpleSqlParser.js#L377
Cheers,
Josh
The text was updated successfully, but these errors were encountered: