-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Refactor querying system allowing more flexible querying #61
Comments
That is a proprietary format. A normal format based on the example would be:
But if you start looking at such flexibility I would seriously start considering grapQL. Also considering that most instance collections(except maybe deads) will be around ~1000 records I think sorting can be done locally easily. |
I'm not sure how I feel about passing in json strings as a query. I've never seen it implemented like that. |
It's not, it's literally what you pass to mongo compass, essentially we're mocking exactly that object literal into the query, parsing it, then passing it to the mongo platform to pull out via the API. We're also declaring against the
It'll be up to the client implementation to parse it as a URL encoded string, which I've seen many times, and is pretty safe unless you're using weird things like emoji. Example:
Will return a ascending sorted array of territory control alerts from Emerald. |
Which spits out object:
Which is then accepted by Mongo and processed using their typehinted object |
I would be very careful with it and have some strict validation in place. But it is still a proprietary form, not as much as how we use it internally but definitely seen from the client server communication. I don't like it, but I won't object. |
Superceded by #64 . |
We need to slightly refactor our sorting / querying system to allow inclusion of JSON encoded objects. This should enable us, via some sanity checking, to be extremely flexible in how we allow users to query for data. We'll quite simply decode this string and send the result to mongo as we would normally.
Example:
This will return the result as expected from querying mongo directly.
The text was updated successfully, but these errors were encountered: