--
You received this message because you are subscribed to the Google Groups "golang-sql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-sql+...@googlegroups.com.
To post to this group, send email to golan...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-sql/87dc46c6-090b-4c29-bcb9-b9dffa8dbc6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
For your purposes, would the following API be able to fully replace your hack?conn, err := db.Conn(ctx)// At the end of Raw, if nil is returned, the driver connection is returned to the connection pool.err = conn.Raw(func(dconn driver.Conn) error{// Returning an error will mark connection as bad and not return it to the pool.// It will also return the error to the result of Raw.return nil})
On Sat, Mar 30, 2019 at 10:12 PM Tamás Gulácsi <tgula...@gmail.com> wrote:
--
2019. március 19., kedd 17:14:27 UTC+1 időpontban Daniel Theophanes a következőt írta:There was a recent proposal to get a driver.Conn from the database/sql package:I closed it, not being convinced by the arguments for it. However, I would love to here specific use cases where this would be a good thing to have. If there is interest I can re-open and discuss on the issue. Let me know. -Danielgopkg.in/goracle.v2 needs the dirver.Conn for several things: object- and subscription creation, startup and shutdown.It uses a hack now: a special query string is treated special, returning the connection.I don't know whether this is safe or not, whether the returned driver connection is put back to the pool or not...
You received this message because you are subscribed to the Google Groups "golang-sql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.
To post to this group, send email to golan...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-sql/87dc46c6-090b-4c29-bcb9-b9dffa8dbc6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.