Registry / testing / data-dog-go-txdb

data-dog-go-txdb

JSON →
library0.2.1gogounverified

Single-transaction database/sql driver for testing database interactions within a transaction.

go get github.com/DATA-DOG/go-txdb
INSTALL
IMPORT
SIG · DATA-DOG-GO-TXDB
D
data-dog-go-txdb
testinggov0.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

txdb
✓ github.com/DATA-DOG/go-txdb

Register and open a transaction-based database connection.

package main import ( "database/sql" "github.com/DATA-DOG/go-txdb" ) func init() { txdb.Register("txdb", "mysql", "user:pass@/dbname") } func main() { db, _ := sql.Open("txdb", "identifier") defer db.Close() }
Debug
Known issues
gotchaEach connection uses a single transaction; changes are rolled back after the connection closes.
fix
Use for testing only; do not use in production.
affects: all
Upgrade
Version history
0.2.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
8
Resources
data-dog-go-txdb — go get data-dog-go-txdb · libregistry