go-sqlmock
go-sqlmock copied to clipboard
Sql mock driver for golang to test database interactions
I am new to sqlmock and go and struggle with my unittest. The mock part seems to work but form my understanding, my method GetCave should return the row I...
is it possible to create a mysql database in memory use go-sqlmock? just like https://github.com/alicebob/miniredis which creates a redis server in your own computer's memory with golang. if so, we...
What version of Go are you using (go version)? go version go1.14 darwin/amd64 github.com/DATA-DOG/go-sqlmock v1.4.1 github.com/jinzhu/gorm v1.9.12 Which database and its version are you using? postgres 10.11 description? Basically it's...
Hi, First off, I just wanted to thank you for creating such a wonderfully useful library! It has been a huge help to me. Although I've managed to figure out...
My code uses pg.Array to read a `text[]` field. Can I use this package to test this code? ... if so, how? Thanks!
When an expectation failed, the SQL request would error suggesting the type of the actual expectation. However, it is not detailed enough to show exactly _which_ expectation failed. Consider the...
I have a query that I run that has a few `sql.Out` parameters. Using go-sqlmock, it doesn't appear to be possible to have values injected into the `Dest` field of...
I am not clearly how it works sqlmock internal. Here is my case: A insert function: ```go func insert() (sql.Result, error) { query := `...` stmt, err := repo.Db.Prepare(query) if...
I have a function to get the primary key columns from a table. How can I use go-sqlmock to create a test case for this function? Thansk in advance! `type...
I tried a nested query. Instead of letting me know the regex is not valid or pointing out differences in the string literal versus the regex pattern, it said query...