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

add doc blocks, split files

This commit is contained in:
gedi
2014-02-07 08:58:27 +02:00
parent 2fc5a0dd15
commit ee2ed8f2d5
8 changed files with 160 additions and 131 deletions

View File

@ -6,13 +6,14 @@ import (
"regexp"
)
// an expectation interface
type expectation interface {
fulfilled() bool
setError(err error)
}
// common expectation
// common expectation struct
// satisfies the expectation interface
type commonExpectation struct {
triggered bool
err error
@ -27,6 +28,7 @@ func (e *commonExpectation) setError(err error) {
}
// query based expectation
// adds a query matching logic
type queryBasedExpectation struct {
commonExpectation
sqlRegex *regexp.Regexp
@ -99,3 +101,4 @@ type expectedExec struct {
result driver.Result
}