mattn/go-sqlite3

Implement support for busy handler

開放

#290 建立於 2016年3月24日

 (10 則留言) (0 個反應) (0 位負責人)C (1,105 個分叉)batch import
enhancementhelp wanted

倉庫指標

星標
 (7,000 顆星)
PR 合併指標
 (平均合併 1天 5小時) (30 天內合併 9 個 PR)

描述

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.

貢獻者指南