stacks-archive / radiks-server

A server for indexing data in decentralized applications
MIT License
54 stars 19 forks source link

problem with advanced queries solved #36

Closed hatskier closed 4 years ago

hatskier commented 4 years ago

This PR solves this issue: https://github.com/blockstack/radiks/issues/67

I've removed query-to-mongo package, because it doesn't work correctly with complex queries, it also did a lot of unnecessary stuff.

I have implemented custom function queryToMongo instead, which supports pagination and returns JS object with the following properties:

This solution will not break anything, because a lot of features from mongo-to-query were not used in radiks-server. Also I've found out that there was a problem with complex queries stringification in radiks repo. It's solved here https://github.com/blockstack/radiks/pull/71. So this commit should be applied also to fix the issue.

I have also added some simple tests to ensure that radiks-server can support (at least doesn't raise an error) for complex queries with $or operator.

claassistantio commented 4 years ago

CLA assistant check
All committers have signed the CLA.