2014-02-05 17:21:07 +03:00
|
|
|
package sqlmock
|
|
|
|
|
|
|
|
import (
|
|
|
|
"database/sql/driver"
|
|
|
|
)
|
|
|
|
|
|
|
|
type statement struct {
|
2015-08-28 10:06:14 +02:00
|
|
|
conn *sqlmock
|
2014-02-05 17:21:07 +03:00
|
|
|
query string
|
2015-07-17 12:14:30 +02:00
|
|
|
err error
|
2014-02-05 17:21:07 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (stmt *statement) Close() error {
|
2015-07-17 12:14:30 +02:00
|
|
|
return stmt.err
|
2014-02-05 17:21:07 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
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)
|
|
|
|
}
|