1
0
mirror of https://github.com/DATA-DOG/go-sqlmock.git synced 2025-01-24 03:16:17 +02:00
go-sqlmock/result.go
2014-02-05 16:21:07 +02:00

22 lines
368 B
Go

package sqlmock
type Result struct {
lastInsertId int64
rowsAffected int64
}
func NewResult(lastInsertId int64, rowsAffected int64) *Result {
return &Result{
lastInsertId,
rowsAffected,
}
}
func (res *Result) LastInsertId() (int64, error) {
return res.lastInsertId, nil
}
func (res *Result) RowsAffected() (int64, error) {
return res.rowsAffected, nil
}