2 ms·
It's the same concept. RAII can (and I have seen DB libraries that do) model a DB transaction as a resource. In the cases that I know of, they take the safe de
by deathanatos 4y ago
It's the same concept.
RAII can (and I have seen DB libraries that do) model a DB transaction as a resource. In the cases that I know of, they take the safe default of rolling the transaction back if the code fails to commit it. But the transaction is never leaked nor is the connection left in some unspecified state.