go-testdb
go-testdb copied to clipboard
Framework for stubbing responses from go's driver.Driver interface
I found some mistakes in docs
This library is very handy, but when used in tests of concurrent code will trigger the go race detector. A very simple case is if you have two tests that...
I would like to retrieve information of the database on a time variable using a specific format. The [Go-MySQL-Driver](https://github.com/go-sql-driver/mysql) uses the format ["2006-01-02 15:04:05"](https://github.com/go-sql-driver/mysql/blob/master/const.go#L14), and the go-testdb by default uses...
At present either a `string` or [`time.Time`](http://golang.org/pkg/time/#Time) is returned for the [`driver.Value`](https://golang.org/pkg/database/sql/driver/#Value) within `RowsFromCSVString`. It would be nice to add support returning a [`sql.NullString`](http://golang.org/pkg/database/sql/#NullString). It could look something like: ```...
These blocks check for q.result and q.rows being nil, but these are valid cases where errors have been stubbed. The anonymous functions return errors. https://github.com/erikstmartin/go-testdb/blob/master/conn.go#L39-L49 https://github.com/erikstmartin/go-testdb/blob/master/conn.go#L51-L58 Write tests and investigate...