aboutsummaryrefslogtreecommitdiff
path: root/sqlite3_go113_test.go (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Build with "go tool" and hackishly bundle code from same package into one ↵EuAndreh2024-08-121-120/+0
| | | | file each
* go fmt ./...Yasuhiro Matsumoto2024-01-251-0/+1
|
* update go version to 1.19Yasuhiro Matsumoto2024-01-251-2/+2
|
* Export sqlite3_stmt_readonly() via SQLiteStmt.Readonly() (#895)Martin Tournoij2020-12-281-0/+41
| | | | | | | | | | | | | | | This can be used like in the test; I wrote a little wrapper around sql.DB which uses this, and allows concurrent reads but just one single write. This is perhaps a better generic "table locked"-solution than setting the connections to 1 and/or cache=shared (although even better would be to design your app in such a way that this doesn't happpen in the first place, but even then a little seat belt isn't a bad thing). The parsing adds about 0.1ms to 0.2ms of overhead in the wrapper, which isn't too bad (and it caches the results, so only needs to do this once). At any rate, I can't really access functions from sqlite3-binding.c from my application, so expose it via SQLiteStmt.
* sqlite3_test.go: Move Go 1.13 test to sqlite3_go113_test.go (#883)Evan Jones2020-11-171-0/+4
| | | | | | | | | Commit 4f7abea96e added a test that uses Conn.Raw, which was added in Go >= 1.13. The go-sqlite3 project runs tests with Go >= 1.11. Remove the test from sqlite3_test.go, so it only runs with the correct versions of Go. Instead of adding a new test, modify the existing test that already uses Conn.Raw() to check the type of driverConn.
* Fix "cannot start a transaction within a transaction" issue (#764) (#765)Andrii Zavorotnii2020-08-291-0/+74
* 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.