Exception: Sqlx::Busy
- Defined in:
- runtime/sqlx/errors.rb,
runtime/sqlx/errors.rbs
Overview
Raised when the database lock could not be taken inside the adapter's
wait budget (PRAGMA busy_timeout, 5 s on SQLite). The unit did not
commit, so the caller may retry the whole unit; retrying one statement
inside an open transaction is not safe, because the driver may have
already rolled that transaction back.
Both adapters map their lock errors here: the sqlite adapter its driver codes 5 (SQLITE_BUSY) and 6 (SQLITE_LOCKED), the PostgreSQL adapter the SQLSTATEs 40P01 (deadlock detected), 55P03 (lock not available) and 40001 (serialization failure).
Instance Method Summary collapse
-
#initialize(message = "Sqlx::Busy") ⇒ Busy
constructor
A new instance of Busy.
Constructor Details
#initialize(message = "Sqlx::Busy") ⇒ Busy
Returns a new instance of Busy.
15 |
# File 'runtime/sqlx/errors.rbs', line 15
def initialize: (?String message) -> void
|