3 ms·
Interesting, it throws an error if result rows don't match expected quantity?
by hu3 2y ago
Interesting, it throws an error if result rows don't match expected quantity?
- wruza 2y agoYes, and together with .in_transaction(cb) wrapper it also rolls everything back. Sadly SQL itself doesn't have something like ASSERT ROWCOUNT <expr>, cause it's such an obvious check, especially in destructive ops. LIMIT exists, but it is silent and quirky with non-SELECTs.