Lots of functions take options like limit that do not affect the shape of the result. These should always be exposed.
Other options, like include_docs "change" the result type. Currently we have separate functions for these. It would be good to have a more consistent naming scheme. Or we could do type-level trickery to make the return type dependent on the options (turn Booleans into present/not present). This would probably be bad for inference though, if we don't need the result and don't pass the option, the type would be ambiguous.
Also, mutually exclusive options: key and keys and (startkey or endkey). I think these could be expressed with type-level trickery and no ill effects.
Lots of functions take options like
limitthat do not affect the shape of the result. These should always be exposed.Other options, like
include_docs"change" the result type. Currently we have separate functions for these. It would be good to have a more consistent naming scheme. Or we could do type-level trickery to make the return type dependent on the options (turn Booleans into present/not present). This would probably be bad for inference though, if we don't need the result and don't pass the option, the type would be ambiguous.Also, mutually exclusive options:
keyandkeysand (startkeyorendkey). I think these could be expressed with type-level trickery and no ill effects.