diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2013-10-29 17:38:43 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2013-10-29 17:38:43 -0700 |
| commit | 7307ffa7cd97bb6a290914efd856a8ae4076e6e5 (patch) | |
| tree | f0797192ecaf072704f6bc3f30bf5dc1897881ab /src/pkg/database/sql | |
| parent | e6c4fa58b5a0c77c9c95d227ed5f36937df0544d (diff) | |
| download | go-7307ffa7cd97bb6a290914efd856a8ae4076e6e5.tar.xz | |
database/sql: document Result methods
Fixes #5110
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/19280046
Diffstat (limited to 'src/pkg/database/sql')
| -rw-r--r-- | src/pkg/database/sql/sql.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pkg/database/sql/sql.go b/src/pkg/database/sql/sql.go index b24b2a8a55..dddf5a3f25 100644 --- a/src/pkg/database/sql/sql.go +++ b/src/pkg/database/sql/sql.go @@ -1637,7 +1637,16 @@ func (r *Row) Scan(dest ...interface{}) error { // A Result summarizes an executed SQL command. 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) + + // 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) } |
