18 lines
392 B
Go
18 lines
392 B
Go
|
package lazy
|
||
|
|
||
|
//driver.Result does not play well with creation, overriding it here so we can return the results without
|
||
|
//requiring sqlmock
|
||
|
type sqlResult struct {
|
||
|
insertID int64
|
||
|
rowsAffected int64
|
||
|
err error
|
||
|
}
|
||
|
|
||
|
func (r *sqlResult) LastInsertId() (int64, error) {
|
||
|
return r.insertID, r.err
|
||
|
}
|
||
|
|
||
|
func (r *sqlResult) RowsAffected() (int64, error) {
|
||
|
return r.rowsAffected, r.err
|
||
|
}
|