Feature: BEGIN immediate/exclusive per transaction
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 9.2k
- Forks
- 1.2k
- Avg merge
- 19m
- Merged PRs (30d)
- 4
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the driver's transaction entry point and trace how the _txlock connection parameter selects the BEGIN statement. Compare the proposed BeginWithType and TransactionType API with the existing transaction flow, with completion defined as selecting Deferred, Immediate, or Exclusive behavior per transaction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sqlite
- Domain
- database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100