collin/do_sqlite — Issue #1: Exposing busy_timeout to sqlite3 API
Author: atotic
Created: 2012-02-11 09:17:34+00:00
State: open

When developing I often have several binaries accessing the same sqlite3 db over datamapper. Database occasionally fails with BusyError. With straight sqlite3, I can fix the problem by using sqlite3's busy_timeout function. This makes sqlite3 retry a busy database for n milisecs, before giving up. It would be great if do_sqlite3 would expose a busy_timeout= function.

Another, more generic option would be to extend sqlite3 URI schema to accept database-specific arguments . For example, sqlite3 URI with busy_timeout would be:
sqlite3://development.sqlite?busy_timeout=100
You could use this for other connection-specific arguments too.

What do you think?