Open stushurik opened 5 years ago
@typicode what do you think about it?
I would love to see such an option! Maybe someone may fork this project #1219 ?
How would you define an "or" in the parameter?
Maybe with _or_
: /connections?count=1_or_count_gte=8
?
I can imagine something like this:
/connections?count=1&count_or_gte=8
Inspired by:
https://gt-tech.bitbucket.io/spring-data-querydsl-value-operators/README.html
https://gt-tech.bitbucket.io/spring-data-querydsl-value-operators/EXAMPLE_APPLICATION.html
I like. What about multiple fields? How is that done in spring? E.g.:
?idA=123_or_idB=123
Would be magic if can consider the Lucene or ElasticSearch syntax, it's really useful
How does the syntax look exactly?
Obviously it's add more complexity: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html
In my db I have something like this:
And I would like to request like this
and get items with count 1,8 and 10.
Currently it seems that json-server applies some kind of "and" logic and this request become mutually exclusive. As a result I get empty array
Proposal allow "or" request