mirror of
https://github.com/DATA-DOG/go-sqlmock.git
synced 2024-11-28 08:49:01 +02:00
25 lines
511 B
Go
25 lines
511 B
Go
package sqlmock
|
|
|
|
import "database/sql/driver"
|
|
|
|
// Argument interface allows to match
|
|
// any argument in specific way when used with
|
|
// ExpectedQuery and ExpectedExec expectations.
|
|
type Argument interface {
|
|
Match(driver.Value) bool
|
|
}
|
|
|
|
// AnyArg will return an Argument which can
|
|
// match any kind of arguments.
|
|
//
|
|
// Useful for time.Time or similar kinds of arguments.
|
|
func AnyArg() Argument {
|
|
return anyArgument{}
|
|
}
|
|
|
|
type anyArgument struct{}
|
|
|
|
func (a anyArgument) Match(_ driver.Value) bool {
|
|
return true
|
|
}
|