biscuit-rust icon indicating copy to clipboard operation
biscuit-rust copied to clipboard

`query_exactly_one()`

Open divarvel opened this issue 2 years ago • 0 comments

In many cases, we want the query to return exactly one result. A canonical example would be querying a user id from a token.

The current API makes it easier to discard extra results than to throw an error in the case of extra results.

I think it would be a good addition to have a query function that only returns a result when there exactly one match

divarvel avatar Sep 19 '23 16:09 divarvel