diff options
author | Andrew Gerrand <adg@golang.org> | 2013-11-01 11:31:18 +1100 |
---|---|---|
committer | Andrew Gerrand <adg@golang.org> | 2013-11-01 11:31:18 +1100 |
commit | f4a268d7804b55d46a4f05c1e6606a740dc194f4 (patch) | |
tree | b9eb30a55f01d65c81b5b3735799588f70491aa1 | |
parent | 193b88db2607ac1e8fe3e6417619ff35a00de028 (diff) | |
download | go-f4a268d7804b55d46a4f05c1e6606a740dc194f4.tar.gz |
[release-branch.go1.2] database/sql: document Result methods
??? CL 19280046 / 2ad8ac71220d
database/sql: document Result methods
Fixes issue 5110
R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/19280046
???
R=golang-dev
CC=golang-dev
https://codereview.appspot.com/20650043
-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 b24b2a8a5..dddf5a3f2 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) } |