WithArgs will match given expected args to actual database exec operation arguments. if at least one argument does not match, it will return an error. For specific arguments an sqlmock.Argument interface can be used to match an argument. Must not be used together with WithoutArgs()
(args ...driver.Value)
| 213 | // arguments an sqlmock.Argument interface can be used to match an argument. |
| 214 | // Must not be used together with WithoutArgs() |
| 215 | func (e *ExpectedExec) WithArgs(args ...driver.Value) *ExpectedExec { |
| 216 | if len(e.args) > 0 { |
| 217 | panic("WithArgs() and WithoutArgs() must not be used together") |
| 218 | } |
| 219 | e.args = args |
| 220 | return e |
| 221 | } |
| 222 | |
| 223 | // WithoutArgs will ensure that no args are passed for this expected database exec action. |
| 224 | // if at least one argument is passed, it will return an error. This allows for stricter |
no outgoing calls