'What are the main differences in use case for sql.DB and sql.Conn when using mysql with go?

sql.Conn and sql.DB both have Exec, Query* and Prepare methods etc. The mysql driver docs say that it maintains a connection pool and makes new connections as necessary when using an sql.DB concurrently. So it looks like I should use DB in most circumstances, and only use Conn if I want to manage connections in my own special way. Is that correct or do I need to take some other factors into account?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source