]> Cypherpunks repositories - gostls13.git/commit
database/sql: allow drivers to only implement Context variants
authorDaniel Theophanes <kardianos@gmail.com>
Sun, 24 Sep 2017 02:38:32 +0000 (19:38 -0700)
committerDaniel Theophanes <kardianos@gmail.com>
Tue, 24 Oct 2017 16:51:29 +0000 (16:51 +0000)
commit532714829ee4e816e54b6ccfe0b28f011f1659b2
tree2c85c86b68bd27f9e80733ed5b74aeb8e1bf9474
parent89a7adf8e47c8e8f7929e68621a66000bb2703e6
database/sql: allow drivers to only implement Context variants

Drivers shouldn't need to implement both Queryer and QueryerContext,
they should just implement QueryerContext. Same with Execer and
ExecerContext. This CL tests for QueryContext and ExecerContext
first so drivers do not need to implement Queryer and Execer
with an empty definition.

Fixes #21663

Change-Id: Ifbaa71da669f4bc60f8da8c41a04a4afed699a9f
Reviewed-on: https://go-review.googlesource.com/65733
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/database/sql/ctxutil.go
src/database/sql/sql.go
src/database/sql/sql_test.go