Tags: kalafut/go-sqlite3
Tags
Fix "cannot start a transaction within a transaction" issue (mattn#764)… … (mattn#765) * Fix "cannot start a transaction within a transaction" issue [why] If db.BeginTx(ctx, nil) context is cancelled too fast, "BEGIN" statement can be completed inside DB, but we still try to cancel it with sqlite3_interrupt. In such case we get context.Cancelled or context.DeadlineExceeded from exec(), but operation really completed. Connection returned into pool, and returns "cannot start a transaction within a transaction" error for next db.BeginTx() call. [how] Handle status code returned from cancelled operation. [testing] Added unit-test which reproduces issue. * Reduce TestQueryRowContextCancelParallel concurrency [why] Tests times out in travis-ci when run with -race option.
Enable all prefixes for named parameters and allow for unused named p… …arameters (mattn#811) * Allow unused named parameters Try to bind all named parameters and ignore those not used. * Allow "@" and "$" for named parameters * Add tests for named parameters Co-authored-by: Guido Berhoerster <[email protected]>
Enable all prefixes for named parameters and allow for unused named p… …arameters (mattn#811) * Allow unused named parameters Try to bind all named parameters and ignore those not used. * Allow "@" and "$" for named parameters * Add tests for named parameters Co-authored-by: Guido Berhoerster <[email protected]>
PreviousNext