result.go 619 B

1234567891011121314151617181920212223
  1. // Go MySQL Driver - A MySQL-Driver for Go's database/sql package
  2. //
  3. // Copyright 2012 Julien Schmidt. All rights reserved.
  4. // http://www.julienschmidt.com
  5. //
  6. // This Source Code Form is subject to the terms of the Mozilla Public
  7. // License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8. // You can obtain one at http://mozilla.org/MPL/2.0/.
  9. package mysql
  10. type mysqlResult struct {
  11. affectedRows int64
  12. insertId int64
  13. }
  14. func (res *mysqlResult) LastInsertId() (int64, error) {
  15. return res.insertId, nil
  16. }
  17. func (res *mysqlResult) RowsAffected() (int64, error) {
  18. return res.affectedRows, nil
  19. }