@@ -247,7 +247,7 @@ func (c *sqlmock) exec(query string, args []namedValue) (*ExpectedExec, error) {
247247 break
248248 }
249249 next .Unlock ()
250- return nil , fmt .Errorf ("call to exec query '%s' with args %+v, was not expected, next expectation is: %s" , query , args , next )
250+ return nil , fmt .Errorf ("call to ExecQuery '%s' with args %+v, was not expected, next expectation is: %s" , query , args , next )
251251 }
252252 if exec , ok := next .(* ExpectedExec ); ok {
253253 if err := exec .attemptMatch (query , args ); err == nil {
@@ -258,7 +258,7 @@ func (c *sqlmock) exec(query string, args []namedValue) (*ExpectedExec, error) {
258258 next .Unlock ()
259259 }
260260 if expected == nil {
261- msg := "call to exec '%s' query with args %+v was not expected"
261+ msg := "call to ExecQuery '%s' with args %+v was not expected"
262262 if fulfilled == len (c .expected ) {
263263 msg = "all expectations were already fulfilled, " + msg
264264 }
@@ -267,11 +267,11 @@ func (c *sqlmock) exec(query string, args []namedValue) (*ExpectedExec, error) {
267267 defer expected .Unlock ()
268268
269269 if ! expected .queryMatches (query ) {
270- return nil , fmt .Errorf ("exec query '%s', does not match regex '%s'" , query , expected .sqlRegex .String ())
270+ return nil , fmt .Errorf ("ExecQuery '%s', does not match regex '%s'" , query , expected .sqlRegex .String ())
271271 }
272272
273273 if err := expected .argsMatches (args ); err != nil {
274- return nil , fmt .Errorf ("exec query '%s', arguments do not match: %s" , query , err )
274+ return nil , fmt .Errorf ("ExecQuery '%s', arguments do not match: %s" , query , err )
275275 }
276276
277277 expected .triggered = true
@@ -280,7 +280,7 @@ func (c *sqlmock) exec(query string, args []namedValue) (*ExpectedExec, error) {
280280 }
281281
282282 if expected .result == nil {
283- return nil , fmt .Errorf ("exec query '%s' with args %+v, must return a database/sql/driver.result , but it was not set for expectation %T as %+v" , query , args , expected , expected )
283+ return nil , fmt .Errorf ("ExecQuery '%s' with args %+v, must return a database/sql/driver.Result , but it was not set for expectation %T as %+v" , query , args , expected , expected )
284284 }
285285
286286 return expected , nil
@@ -337,7 +337,7 @@ func (c *sqlmock) prepare(query string) (*ExpectedPrepare, error) {
337337 }
338338 defer expected .Unlock ()
339339 if ! expected .sqlRegex .MatchString (query ) {
340- return nil , fmt .Errorf ("query '%s', does not match regex [%s]" , query , expected .sqlRegex .String ())
340+ return nil , fmt .Errorf ("Prepare query string '%s', does not match regex [%s]" , query , expected .sqlRegex .String ())
341341 }
342342
343343 expected .triggered = true
@@ -394,7 +394,7 @@ func (c *sqlmock) query(query string, args []namedValue) (*ExpectedQuery, error)
394394 break
395395 }
396396 next .Unlock ()
397- return nil , fmt .Errorf ("call to query '%s' with args %+v, was not expected, next expectation is: %s" , query , args , next )
397+ return nil , fmt .Errorf ("call to Query '%s' with args %+v, was not expected, next expectation is: %s" , query , args , next )
398398 }
399399 if qr , ok := next .(* ExpectedQuery ); ok {
400400 if err := qr .attemptMatch (query , args ); err == nil {
@@ -406,7 +406,7 @@ func (c *sqlmock) query(query string, args []namedValue) (*ExpectedQuery, error)
406406 }
407407
408408 if expected == nil {
409- msg := "call to query '%s' with args %+v was not expected"
409+ msg := "call to Query '%s' with args %+v was not expected"
410410 if fulfilled == len (c .expected ) {
411411 msg = "all expectations were already fulfilled, " + msg
412412 }
@@ -416,11 +416,11 @@ func (c *sqlmock) query(query string, args []namedValue) (*ExpectedQuery, error)
416416 defer expected .Unlock ()
417417
418418 if ! expected .queryMatches (query ) {
419- return nil , fmt .Errorf ("query '%s', does not match regex [%s]" , query , expected .sqlRegex .String ())
419+ return nil , fmt .Errorf ("Query '%s', does not match regex [%s]" , query , expected .sqlRegex .String ())
420420 }
421421
422422 if err := expected .argsMatches (args ); err != nil {
423- return nil , fmt .Errorf ("exec query '%s', arguments do not match: %s" , query , err )
423+ return nil , fmt .Errorf ("Query '%s', arguments do not match: %s" , query , err )
424424 }
425425
426426 expected .triggered = true
@@ -429,7 +429,7 @@ func (c *sqlmock) query(query string, args []namedValue) (*ExpectedQuery, error)
429429 }
430430
431431 if expected .rows == nil {
432- return nil , fmt .Errorf ("query '%s' with args %+v, must return a database/sql/driver.rows , but it was not set for expectation %T as %+v" , query , args , expected , expected )
432+ return nil , fmt .Errorf ("Query '%s' with args %+v, must return a database/sql/driver.Rows , but it was not set for expectation %T as %+v" , query , args , expected , expected )
433433 }
434434 return expected , nil
435435}
@@ -473,11 +473,11 @@ func (c *sqlmock) Commit() error {
473473
474474 next .Unlock ()
475475 if c .ordered {
476- return fmt .Errorf ("call to commit transaction, was not expected, next expectation is: %s" , next )
476+ return fmt .Errorf ("call to Commit transaction, was not expected, next expectation is: %s" , next )
477477 }
478478 }
479479 if expected == nil {
480- msg := "call to commit transaction was not expected"
480+ msg := "call to Commit transaction was not expected"
481481 if fulfilled == len (c .expected ) {
482482 msg = "all expectations were already fulfilled, " + msg
483483 }
@@ -508,11 +508,11 @@ func (c *sqlmock) Rollback() error {
508508
509509 next .Unlock ()
510510 if c .ordered {
511- return fmt .Errorf ("call to rollback transaction, was not expected, next expectation is: %s" , next )
511+ return fmt .Errorf ("call to Rollback transaction, was not expected, next expectation is: %s" , next )
512512 }
513513 }
514514 if expected == nil {
515- msg := "call to rollback transaction was not expected"
515+ msg := "call to Rollback transaction was not expected"
516516 if fulfilled == len (c .expected ) {
517517 msg = "all expectations were already fulfilled, " + msg
518518 }
0 commit comments