3 ms·
One company asked me to write a wrapper around database/sql that adds a connection pool. This is pretty easy until you want to implement any function that retur
by anonymoushn 7y ago
One company asked me to write a wrapper around database/sql that adds a connection pool. This is pretty easy until you want to implement any function that returns Row, which you just can't, because you can't make one of those. Amazing.
- jimsmart 7y agoTake care, you may be wrapping your connection pool around a built-in connection pool. Furthermore, some dbs might not like log-lived connections. http://go-database-sql.org/connection-pool.html http://go-database-sql.org/connection-pool.html
- anonymoushn 7y agoSorry, my original reply was unclear. The connections would be to different replicas, and it was just a hiring task rather than something one would actually use in production.