mirror of
https://github.com/joohoi/acme-dns.git
synced 2025-01-07 05:50:43 +07:00
fd9ce4606d
* Replace iris with httprouter * Linter fixes * Finalize iris removal * Vendor dependencies for reproducable builds * Api tests are back
26 lines
613 B
Go
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
|
|
}
|