DATA-DOG / go-sqlmock

Sql mock driver for golang to test database interactions
Other
6.05k stars 406 forks source link

How to simulate the method of passing in *Sql.Tx parameters #232

Closed jmuwfq closed 3 months ago

jmuwfq commented 4 years ago

Like this:

func (userDao *UserDao) UpdateByTx(tx *sql.Tx, user *User) (id int32, err error) {
    tx.Exec(....)
}

How to simulate tx.Exec(), I tried many times but failed

diegommm commented 3 months ago

Hi @jmuwfq! Closing as there is not enough information to help you, unfortunately. If the problem persists, reopen and provide the following information:

Thank you!