Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vladimir Barsukov
zdb
Commits
7ab65a68
Commit
7ab65a68
authored
May 21, 2023
by
Vladimir Barsukov
Browse files
add new conns
parent
cd95eb12
Changes
1
Hide whitespace changes
Inline
Side-by-side
pool.go
View file @
7ab65a68
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment