Skip to content
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

Improve query AND and OR operators of BaseCrudController #2

Open
stopyoukid opened this issue Feb 24, 2015 · 0 comments
Open

Improve query AND and OR operators of BaseCrudController #2

stopyoukid opened this issue Feb 24, 2015 · 0 comments

Comments

@stopyoukid
Copy link
Contributor

BaseCrudController is using an AND|OR regex to split the query string. This has problems when consumers of the api are searching for something that contains the text AND or OR, such as firstName:RANDY, this will screw up the query string. We should update this to use, | and & respectively. For one they are less used in queries, but for two it is shorter and makes more sense. Something alone the lines of a regex (?<!\|)\|(?!\|) should work. If bars are used in the queries, you can escape the bar with another bar, so firstName:BOB||BOBBY.

I suggest in the meantime to implement the new way, and add a application configuration variable that tells the BaseCrudController which method to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant