go-sqlmock icon indicating copy to clipboard operation
go-sqlmock copied to clipboard

Sql mock driver for golang to test database interactions

Results 95 go-sqlmock issues
Sort by recently updated
recently updated
newest added
trafficstars

### Issue Hey there, it looks like your License isn't being interpreted by GitHub correctly, which means that it's not in the proper format. This is an example of using...

I do not have much spare time for this library and willing to transfer the repository ownership to person or an organization motivated to maintain it. Open up a conversation...

help-wanted

Hi, having trouble with using go routines. `sqlmock version 1.5.0` below is the code when functions run serial no error occurs but panics when used with goroutines. 🖊️ update: second...

bug

I'm trying to unit test a scenario where I get a duplicate key error but am not able to do the same. service.go ``` func (s *service) addNewUser(newUser *models.User) error...

question

Hi, guys, i wrote one pice of code as below, but i couldn't use WithArgs like this: mock.ExpectQuery(query2).WithArgs(122).WillReturnRows(rs2),so i have to use it like this: **query2:= "SELECT (.+) as count...

needs-info

Hello, I am having a problem when I working with gorm v2. I have tried every solution and I could find but none worked. gorm version: 1.22.4 sqlmock version: v1.5.0...

bug
needs-investigation

### Proposal The last Go version Travis supports is v1.17! This can be updated to v1.18

**what happened:** when I want to test ``` _, err := o.QueryTable(Quota{}).Filter("project", project).Update(orm.Params{ "used": used, "update_at": time.Now().UTC(), }) ``` expected sql I tested with `UPDATE "quota" SET "used" = $1,...