1
0
mirror of https://github.com/zhashkevych/go-sqlxmock.git synced 2025-06-12 21:47:29 +02:00

initial commit

This commit is contained in:
gedi
2014-02-05 16:21:07 +02:00
commit 3e67393335
10 changed files with 789 additions and 0 deletions

27
statement.go Normal file
View File

@ -0,0 +1,27 @@
package sqlmock
import (
"database/sql/driver"
)
type statement struct {
conn *conn
query string
}
func (stmt *statement) Close() error {
stmt.conn = nil
return nil
}
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)
}