mattn/go-sqlite3

Feature: BEGIN immediate/exclusive per transaction

オープン

#400 opened on 2017/03/25

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

Repository metrics

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

説明

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

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