-
Notifications
You must be signed in to change notification settings - Fork 183
Explain low-level protocol leaky abstractions #38
Comments
Do you know of other specific problems for different RDBMSes? To me, only sql.Results on PostgreSQL comes to mind (you only get last_insert_id and rows_changed when you run it as Query instead of SELECT and have to append something to your query which is hard to do mechanically). But I lack experience in anything but MySQL... Also, we don't use strconv (not anywhere as far as I can see at a glance). |
Oh, I didn't realize that you don't use strconv. I guess the database/sql var name string On some of the rows you'll get a strconv error -- for the rows where the |
SHOW STATUS returns a number in the second column? |
another one: |
Right. Here's what I mean: most of the time, there is a number (in string
I discovered this by accident. It cleans up my client code a lot. All I |
Drivers can implement some level of convenience, but ultimately the user can still be exposed to the low-level way the data is transmitted in the driver. For example, the mysql driver will do a strconv.ParseXXX to scan into integers and floats and so on, which avoids some code in your application sometimes. But it is still possible for users to see the differences in binary versus textual protocol; see for example go-sql-driver/mysql#211
The text was updated successfully, but these errors were encountered: