acme-dns/vendor/github.com/erikstmartin/go-testdb/result.go
Joona Hoikkala fd9ce4606d
Get rid of Iris and use julienschmidt/httprouter instead (#20)
* Replace iris with httprouter

* Linter fixes

* Finalize iris removal

* Vendor dependencies for reproducable builds

* Api tests are back
2017-11-14 23:54:29 +02:00

26 lines
613 B
Go

package testdb
type Result struct {
lastInsertId int64
lastInsertIdError error
rowsAffected int64
rowsAffectedError error
}
func NewResult(lastId int64, lastIdError error, rowsAffected int64, rowsAffectedError error) (res *Result) {
return &Result{
lastInsertId: lastId,
lastInsertIdError: lastIdError,
rowsAffected: rowsAffected,
rowsAffectedError: rowsAffectedError,
}
}
func (res *Result) LastInsertId() (int64, error) {
return res.lastInsertId, res.lastInsertIdError
}
func (res *Result) RowsAffected() (int64, error) {
return res.rowsAffected, res.rowsAffectedError
}