mirror of
https://github.com/zhashkevych/go-sqlxmock.git
synced 2024-11-24 08:12:13 +02:00
20 lines
378 B
Go
20 lines
378 B
Go
// +build go1.9
|
|
|
|
package sqlmock
|
|
|
|
import (
|
|
"database/sql"
|
|
"database/sql/driver"
|
|
)
|
|
|
|
// CheckNamedValue meets https://golang.org/pkg/database/sql/driver/#NamedValueChecker
|
|
func (c *sqlmock) CheckNamedValue(nv *driver.NamedValue) (err error) {
|
|
switch nv.Value.(type) {
|
|
case sql.Out:
|
|
return nil
|
|
default:
|
|
nv.Value, err = c.converter.ConvertValue(nv.Value)
|
|
return err
|
|
}
|
|
}
|