NewConn creates a new connection and returns it to the user. This will still obey MaxActiveConns but will not include it in the pool and won't increase the pool size. NOTE: If you directly get a connection from the pool, it won't be pooled and won't support maintnotifications upgrades.
(ctx context.Context)
| 577 | // |
| 578 | // NOTE: If you directly get a connection from the pool, it won't be pooled and won't support maintnotifications upgrades. |
| 579 | func (p *ConnPool) NewConn(ctx context.Context) (*Conn, error) { |
| 580 | return p.newConn(ctx, false) |
| 581 | } |
| 582 | |
| 583 | func (p *ConnPool) newConn(ctx context.Context, pooled bool) (*Conn, error) { |
| 584 | if p.closed() { |