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
86825056
Commit
86825056
authored
Nov 04, 2023
by
Vladimir Barsukov
Browse files
log
parent
c2aea025
Changes
1
Hide whitespace changes
Inline
Side-by-side
pool.go
View file @
86825056
...
...
@@ -421,8 +421,21 @@ func (d *Pool) prepare(sql string, param map[string]any) string {
}
}
if
_
,
ok
:=
param
[
"_debug"
];
ok
{
d
.
logger
.
Printf
(
sql
)
if
v
,
ok
:=
param
[
"_debug"
];
ok
{
switch
vv
:=
v
.
(
type
)
{
case
bool
:
if
vv
{
d
.
logger
.
Printf
(
sql
)
}
case
int
,
uint
:
if
vv
==
1
{
d
.
logger
.
Printf
(
sql
)
}
case
string
:
if
vv
==
"1"
{
d
.
logger
.
Printf
(
sql
)
}
}
}
return
sql
...
...
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