`Query` options can be used in inappropriate places.
tomprince opened this issue · 1 comments
tomprince commented
Currently, Client::find
and Client::search
both accept a Query
which has fields for filters, grouping, and windowing. But find
and search
only accept filters and windowing. I've got WIP implementations of list
and findadd
, the former only takes filters and grouping, the later only filters.
There are at least a couple of solutions:
- the most straightforward is to simply split up
Query
into its component parts and only accept the parts that are valid for each command. - it'd also be possible to do something with phantom-types, but this seems more complicated for no gain.
kstep commented
This seems like an interesting idea. I may give it a try in a separate branch.