1
0
mirror of https://github.com/DATA-DOG/go-sqlmock.git synced 2025-06-23 00:17:47 +02:00

allow to expect prepared statement to be closed, closes #89

This commit is contained in:
gedi
2017-09-01 10:24:02 +03:00
parent c91a7f4b68
commit 9d03611ad1
5 changed files with 57 additions and 8 deletions

View File

@ -6,12 +6,13 @@ import (
type statement struct {
conn *sqlmock
ex *ExpectedPrepare
query string
err error
}
func (stmt *statement) Close() error {
return stmt.err
stmt.ex.wasClosed = true
return stmt.ex.closeErr
}
func (stmt *statement) NumInput() int {