sqlboiler/vendor/gopkg.in/DATA-DOG/go-sqlmock.v1/statement.go

28 lines
470 B
Go
Raw Normal View History

2016-08-30 08:24:25 +02:00
package sqlmock
import (
"database/sql/driver"
)
type statement struct {
conn *sqlmock
query string
err error
}
func (stmt *statement) Close() error {
return stmt.err
}
func (stmt *statement) NumInput() int {
return -1
}
func (stmt *statement) Exec(args []driver.Value) (driver.Result, error) {
return stmt.conn.Exec(stmt.query, args)
}
func (stmt *statement) Query(args []driver.Value) (driver.Rows, error) {
return stmt.conn.Query(stmt.query, args)
}