mattn/go-sqlite3

Implement support for busy handler

Open

#290 ouverte le 24 mars 2016

Voir sur GitHub
 (10 commentaires) (0 réactions) (0 assignés)C (1 105 forks)batch import
enhancementhelp wanted

Métriques du dépôt

Stars
 (7 000 stars)
Métriques de merge PR
 (Merge moyen 1j 5h) (9 PRs mergées en 30 j)

Description

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.

Guide contributeur