On Thu, Sep 24, 2020 at 11:02 AM [email protected] <[email protected]> wrote:
> Thank you Jeremy (as always!). We definitely have cases where a single > row is expected, but it may be worth it to enforce anyway. I'm also > thinking of having adding a `first!` method that will work without an > `order`. > Dataset#first! already exists and raises an exception if no row is returned, so you may want to pick a new method name. One way to lessen the chance of error is to limit the result set to 2 rows. If 2 rows are returned and the dataset is unordered, you can raise an exception. If only 1 row is returned, you don't raise an exception, just return the row, because then the lack of an order would not matter. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/CADGZSSdJ4P1kq%2BGDRWoouK62uBwueeGUTVPA98eYp%2BJ%2Bhuzz3A%40mail.gmail.com.
