mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
database/sql: document Result methods
Fixes #5110 R=golang-dev, r CC=golang-dev https://golang.org/cl/19280046
This commit is contained in:
parent
e6c4fa58b5
commit
7307ffa7cd
1 changed files with 9 additions and 0 deletions
|
|
@ -1637,7 +1637,16 @@ func (r *Row) Scan(dest ...interface{}) error {
|
||||||
|
|
||||||
// A Result summarizes an executed SQL command.
|
// A Result summarizes an executed SQL command.
|
||||||
type Result interface {
|
type Result interface {
|
||||||
|
// LastInsertId returns the integer generated by the database
|
||||||
|
// in response to a command. Typically this will be from an
|
||||||
|
// "auto increment" column when inserting a new row. Not all
|
||||||
|
// databases support this feature, and the syntax of such
|
||||||
|
// statements varies.
|
||||||
LastInsertId() (int64, error)
|
LastInsertId() (int64, error)
|
||||||
|
|
||||||
|
// RowsAffected returns the number of rows affected by an
|
||||||
|
// update, insert, or delete. Not every database or database
|
||||||
|
// driver may support this.
|
||||||
RowsAffected() (int64, error)
|
RowsAffected() (int64, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue