-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
feat: add support for query operators #2
Conversation
License: MIT Signed-off-by: Vaibhav Saini <vasa@dappkit.io>
@vaultec81 I will try to optimize the query algorithm in the future releases. Let me know if you can suggest some optimizations in Also, the implementation is a bit messy. I will clean it up going forward. |
let res = parseAndFind(query, this._index, false) | ||
return res |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible issue here. How does this affect when we want to use an on disk index or other optimized index?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not aware of that. How should this be written? Should I add another param for supplying a custom index?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure at the moment. We don't have any formal API for index/store. I think for now its alright.
I got a few ideas to make this efficient: Short-circuit evaluation UPDATE: Applied all optimizations that I could think of. The performance improved for some specific conditions. |
use short-circuit evaluation License: MIT Signed-off-by: Vaibhav Saini <vasa@dappkit.io>
Supported Conditional Operators
Supported Logical Operators
Observations
License: MIT
Signed-off-by: Vaibhav Saini vasa@dappkit.io