{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/16673","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/16673/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/16673/comments","events_url":"https://api.github.com/repos/golang/go/issues/16673/events","html_url":"https://github.com/golang/go/issues/16673","id":170689285,"number":16673,"title":"proposal: officially freeze database/sql - possibly move development to x repo","user":{"login":"kardianos","id":755121,"avatar_url":"https://avatars.githubusercontent.com/u/755121?v=3","gravatar_id":"","url":"https://api.github.com/users/kardianos","html_url":"https://github.com/kardianos","followers_url":"https://api.github.com/users/kardianos/followers","following_url":"https://api.github.com/users/kardianos/following{/other_user}","gists_url":"https://api.github.com/users/kardianos/gists{/gist_id}","starred_url":"https://api.github.com/users/kardianos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kardianos/subscriptions","organizations_url":"https://api.github.com/users/kardianos/orgs","repos_url":"https://api.github.com/users/kardianos/repos","events_url":"https://api.github.com/users/kardianos/events{/privacy}","received_events_url":"https://api.github.com/users/kardianos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-08-11T16:32:28Z","updated_at":"2016-08-11T20:40:42Z","closed_at":null,"body":"The database/sql API works well in many cases and the simplicity is extremely appealing. However is has been noted that if done again it wouldn't be in the std lib (maybe in an \"x\" repo).\r\n\r\nHere are some of the major issues with `database/sql`:\r\n * No context support / difficult to add in now (easy to leak connections).\r\n * No multiple result set support (sql server, postgresql, my sql, oracle use this).\r\n * Unable to specify a transaction level (this is important for certain cases).\r\n * No support for named input parameters (mature database tables can get wide, counting columns has huge potential to introduce bugs and reduces clarity).\r\n\r\nHere are some of the minor issues with `database/sql`:\r\n * Unable to get result database types.\r\n * Unable to set parameter database types (can be important, can result in type mismatch issues).\r\n * No API for bulk insert operations (rdbms often have an alternate API for this).\r\n * No Savepoint / Rollback To API (often suggested in place of nested transactions: sql server, postgresql, my sql).\r\n * No support for output parameters (often used esp when a shop requires all logic in stored procs / functions).\r\n * Developers often want type `string` from database types `varchar` and `text`, useful to be able to have as a default (with option to get as bytes to reduce allocs if desired).\r\n * Cannot stream out large values (many databases support 1GB values, want to stream them out in an io.Writer).\r\n\r\nSome of these may have been omitted by design, some by oversight, and some because the API was not available yet (context). However it is possible to make a `database/sql` compatible API from a more powerful API (I've done this). In this case I'm strongly favor making a more powerful API available. Due to fundamental issues with adding a context to the existing API, I propose freezing the `database/sql` package and moving development to an \"golang.org/x\" repo.\r\n\r\n---\r\n\r\nI would want to survey the developer community before proceeding. I also have a proposed API I am developing https://godoc.org/github.com/kardianos/rdb which is an evolution of an API I have in production today.\r\n\r\nI would be interested in hearing feedback from the go team (cc @bradfitz ) and others in the community who connect to rdbms (cc @kostya-sh @nightlyone @realpg @joegrasse @asambeka @kirubasankars )\r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/239285386","html_url":"https://github.com/golang/go/issues/16673#issuecomment-239285386","issue_url":"https://api.github.com/repos/golang/go/issues/16673","id":239285386,"user":{"login":"dlsniper","id":607868,"avatar_url":"https://avatars.githubusercontent.com/u/607868?v=3","gravatar_id":"","url":"https://api.github.com/users/dlsniper","html_url":"https://github.com/dlsniper","followers_url":"https://api.github.com/users/dlsniper/followers","following_url":"https://api.github.com/users/dlsniper/following{/other_user}","gists_url":"https://api.github.com/users/dlsniper/gists{/gist_id}","starred_url":"https://api.github.com/users/dlsniper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlsniper/subscriptions","organizations_url":"https://api.github.com/users/dlsniper/orgs","repos_url":"https://api.github.com/users/dlsniper/repos","events_url":"https://api.github.com/users/dlsniper/events{/privacy}","received_events_url":"https://api.github.com/users/dlsniper/received_events","type":"User","site_admin":false},"created_at":"2016-08-11T20:40:42Z","updated_at":"2016-08-11T20:40:42Z","body":"Updated thr comment. I will try and contribute it in 1.8"}}
{"actor":{"display_login":"dlsniper"}}