Open tgross35 opened 1 year ago
Hi. Whether some query returns one or multiple rows depends mostly on the query itself that, in turn, depends on the application logic. I believe this shouldn't be a driver problem. From the driver perspective this adds a new error variant ManyOrNoRowsReturnedWhileExactlyOneRowIsExpected
that seems odd for a database driver to have.
This kind of method is helpful for when you expect a single item, and any more would indicate an error. The signature would be approximately:
Any result count other than one returns an error.