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

Planned support for partial matching - e.g. something like MongoDB Regex? #50

Closed
ghost opened this issue Jul 9, 2013 · 4 comments
Closed

Comments

@ghost
Copy link

ghost commented Jul 9, 2013

If, for no other reason, for something as simple as case-insentitive matching in values?

@louischatriot
Copy link
Owner

Good idea, I'll do it.

@maxkueng
Copy link

There's qry. A module that matches objects against MongoDB queries. I think this would be a great fit. It has pretty great support already including $regex. Only geospatial operators, $type and the $ (as a placeholder for array indexes) notation are not implemented yet.

We used this to implement a real-time pubsub with queries instead of channel names as subscriptions. And use the same queries to directly query a MongoDB instance to load historic data.

@louischatriot
Copy link
Owner

That's interesting! I'll take a serious look at it.

@louischatriot
Copy link
Owner

Regex are now supported, as of v0.7.15. You can use them in basic querying o with the $regex operator if you need to use another operator with it. $options is not supported (contrary to mongo) because it doesn't give more power than simple regex flags. You can check the documentation for examples.

I also took a look at qry, and it's pretty neat but nedb already implements most of what qry does so I chose not to use it. I wish I had known about it when I started nedb though!

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