mattn/go-sqlite3

Implement support for busy handler

オープン

#290 opened on 2016/03/24

 (10 件のコメント) (0 件のリアクション) (0 人の担当者)C (1,105 件のフォーク)batch import
enhancementhelp wanted

Repository metrics

Stars
 (7,000 個のスター)
PR merge metrics
 (平均マージ 1d 5h) (30d で 9 merged PRs)

説明

I think it'd be good for these bindings to support https://www.sqlite.org/c3ref/busy_handler.html .

Use case: I'm currently writing an app that causes quite a bit of traffic to an SQLite database and am encountering contention. I wrote my own wrappers around the queries I'm issuing to handle SQLITE_BUSY errors and retry them... but I just discovered that SQLite3 has a built-in mechanism for this via sqlite3_busy_handler. It would be nice if we could register a hook via SQLiteConn or something like that.

コントリビューターガイド