-
# Sql Mismatch
Here is my output error
```go
ExecQuery: could not match actual sql: "INSERT INTO `arg_configs` (`created_at`,`updated_at`,`arg_name`,`arg_key`,`arg_value`,`arg_comment`) VALUES …
-
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 not expected and unable to match act…
-
There is a bug on this line https://github.com/DATA-DOG/go-sqlmock/blob/master/sqlmock.go#L256
```
if expected.txOpts != nil &&
expected.txOpts.Isolation != opts.Isolation &&
expected.txOpt…
-
### Operating system and Go Version
macOS 14.4.1, Go 1.20
### Issue
When using `db.Query` to perform a query that does not return any rows, sqlmock panics instead of performing a no-op as o…
-
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 script…
-
Because of https://github.com/DATA-DOG/go-sqlmock/issues/161 need changes in code. Need replace gopkg.in to github.com.
Halfi updated
5 years ago
-
## Your Question
多个嵌入的结构中,如果通过 `clause.Associations` 删除该model下全部的关联关系(包含一个 `hasmany` 和 一个`many2many` )
`db.Select(clause.Associations).Delete(&TargetModel{}) ` 语句执行的删除sql 执行顺序不一致? 这个是预期的吗?
这…
-
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 added in the mock part? It is a GRPC implemen…
-
We used sqlmock package to mock sql rows. we currently replaced database/sql with pgx package. We tried to replace sqlmock for pgx.rows. But we are not able to find any suitable code to replace this…
-
Starting Suggestions
1. Go-SQLMock (This one seems like the standard)
https://github.com/DATA-DOG/go-sqlmock
2. testify/mock package (Have not looked too deep into this one yet)
3. Just …