fixed
This commit is contained in:
1 parent
4194cef934
commit
363127fe9e
3350 files changed
+1284220
-1
No files matched your search
+19
@@ -0,0 +1,19 @@
|
||||
package pgxmock
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/jackc/pgconn"
|
||||
)
|
||||
|
||||
// NewResult creates a new sql driver Result
|
||||
// for Exec based query mocks.
|
||||
func NewResult(op string, rowsAffected int64) pgconn.CommandTag {
|
||||
return pgconn.CommandTag(op + " " + strconv.FormatInt(rowsAffected, 10))
|
||||
}
|
||||
|
||||
// NewErrorResult creates a new sql driver Result
|
||||
// which returns an error given for both interface methods
|
||||
func NewErrorResult(err error) pgconn.CommandTag {
|
||||
return pgconn.CommandTag(err.Error())
|
||||
}
|
||||
Reference in new issue
Block a user