From 968742a824de0a6459d2820d11b9e2e58803f472 Mon Sep 17 00:00:00 2001 From: Daniel Theophanes Date: Mon, 29 Oct 2018 16:22:37 -0700 Subject: database/sql: add support for returning cursors to client This CL add support for converting a returned cursor (presented to this package as a driver.Rows) and scanning it into a *Rows. Fixes #28515 Change-Id: Id8191c568dc135af9e5e8555efcd01987708edcb Reviewed-on: https://go-review.googlesource.com/c/145738 Reviewed-by: Brad Fitzpatrick --- src/database/sql/driver/driver.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/database/sql/driver') diff --git a/src/database/sql/driver/driver.go b/src/database/sql/driver/driver.go index 70b3ddc470..5ff2bc9735 100644 --- a/src/database/sql/driver/driver.go +++ b/src/database/sql/driver/driver.go @@ -24,6 +24,11 @@ import ( // []byte // string // time.Time +// +// If the driver supports cursors, a returned Value may also implement the Rows interface +// in this package. This is used when, for example, when a user selects a cursor +// such as "select cursor(select * from my_table) from dual". If the Rows +// from the select is closed, the cursor Rows will also be closed. type Value interface{} // NamedValue holds both the value name and value. -- cgit v1.3-5-g9baa