mattn/go-sqlite3

Feature: BEGIN immediate/exclusive per transaction

Open

#400 aperta il 25 mar 2017

Vedi su GitHub
 (16 commenti) (1 reazione) (0 assegnatari)C (1105 fork)batch import
enhancementhelp wantedresearch

Metriche repository

Star
 (7000 star)
Metriche merge PR
 (Merge medio 1g 5h) (9 PR mergiate in 30 g)

Descrizione

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

Guida contributor