mattn/go-sqlite3

Feature: BEGIN immediate/exclusive per transaction

Ouverte

#400 ouverte le 25 mars 2017

 (16 commentaires) (1 réaction) (0 personne assignée)C (1 105 forks)batch import
enhancementhelp wantedresearch

Métriques du dépôt

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

Description

Right now, the _txlock connection parameter determines which BEGIN statement is used to start a transaction. I'd like to be able to pick this at a per-transaction level. I don't think there's a way of exposing this functionality to database/sql, but it would be good to add an option there eventually. I'm imagining adding:

func (c *SQLiteConn) BeginWithType(t TransactionType) (driver.Tx, error)

type TransactionType int

const (
  Deferred TransactionType = iota
  Immediate
  Exclusive
)

Relevant SO post: https://stackoverflow.com/questions/42657639/begin-immediate-in-sqlx-or-database-sql-golang

Guide contributeur