]> Cypherpunks repositories - gostls13.git/commit
database/sql: add context methods
authorDaniel Theophanes <kardianos@gmail.com>
Mon, 19 Sep 2016 18:19:32 +0000 (11:19 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 27 Sep 2016 19:41:09 +0000 (19:41 +0000)
commite13df02e5fbf2c0cd8811b826a8c8567efa882dd
treed07465f0472a1fdd7b8384a1dba32f8fea326e64
parent54a72d90f62030034f03cacbac1d1ec02c0444c6
database/sql: add context methods

Add context methods to sql and sql/driver methods. If
the driver doesn't implement context methods the connection
pool will still handle timeouts when a query fails to return
in time or when a connection is not available from the pool
in time.

There will be a follow-up CL that will add support for
context values that specify transaction levels and modes
that a driver can use.

Fixes #15123

Change-Id: Ia99f3957aa3f177b23044dd99d4ec217491a30a7
Reviewed-on: https://go-review.googlesource.com/29381
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/database/sql/ctxutil.go [new file with mode: 0644]
src/database/sql/driver/driver.go
src/database/sql/sql.go
src/database/sql/sql_test.go
src/go/build/deps_test.go