FAQ
Humm...

Is there any particular reason the sql package distinguishes between a
query that returns a set of rows, and an 'Exec' that returns a 'Result'
type, which contains the insert id and affected rows?

A number of dbs (notably postgres and sql server) don't support the mysql
concept of 'last insert id' as a simple output.

I'm in the process of writing a wrapper that transparently wraps the sql
package and does away with 'exec' and 'result' entirely and converts
everything into a *Rows on return, specifically because of that, but I was
wondering if someone could drop in with the justification for this decision
in the api?

I realize it probably makes it easier to write some database drivers, but
it makes it basically impossible to implement the api for others....

~
Doug.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 20 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedApr 7, '13 at 2:29p
activeApr 12, '13 at 7:19p
posts20
users5
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase