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

Syntax for Keyword Searching (LIKE in SQL) #69

Open
blesson3 opened this issue Sep 19, 2016 · 2 comments
Open

Syntax for Keyword Searching (LIKE in SQL) #69

blesson3 opened this issue Sep 19, 2016 · 2 comments

Comments

@blesson3
Copy link
Contributor

What is the syntax for filtering by wildcard using a FileBackend?

Ex.
I have a Dog document class that has one object persisted with the properties of
{ 'name':'fido', 'color':'brown', 'owner':'Joe Smith' }
I want to be able to filter through all of the persisted dog objects with a wildcard like so,
dogs = backend.filter(Dog, { 'owner': { '$LIKE': 'Joe%' } })
and have the object specified above to be returned in an array.

Is this already supported in any fashion? If not, then is there any movement to support this?

@blesson3
Copy link
Contributor Author

blesson3 commented Sep 19, 2016

Found that the Advanced Querying operators include the $regex operator, which is not found in the tutorial documentation https://github.com/adewes/blitzdb/blob/master/docs/source/tutorials/basics.rst#advanced-querying

@johnnyutahh
Copy link

Can the Blitz team confirm the above comment is a supported and recommended approach for now and the future to solve this issue?

@blesson3 blesson3 reopened this Sep 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants