Commit 7ab65a68 authored by Vladimir Barsukov's avatar Vladimir Barsukov
Browse files

add new conns

parent cd95eb12
......@@ -91,6 +91,20 @@ func (d *Pool) NewConn(mode connMode, pgConnString string) error {
return err
}
func (d *Pool) NewConns(mode connMode, pgConnString ...string) error {
d.mu.Lock()
defer d.mu.Unlock()
for _, s := range pgConnString {
if err := d.NewConn(mode, s); err != nil {
return err
}
}
return nil
}
func (d *Pool) newConn(mode connMode, pgConnString string) (q *conn, err error) {
var pgxPool *pgxpool.Pool
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment