You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases, the statement is defined to take the query as bind parameters. See the following case.
if I take com.p6spy.engine.common.P6LogQuery#logElapsed(int, long, com.p6spy.engine.logging.Category, com.p6spy.engine.common.Loggable) method where i've loggable as CallableStatementInformation.
with that when I get loggable.getSql() it returns {call [some_DB].[sys].[sp_executesql] (?,?,?)} But if you take loggable.getSqlWithValues() it gives me {call [some_DB].[sys].[sp_executesql] ('SELECT [command] FROM spd.SomeTable WHERE [name]=@0','@0 varchar(4000)','some_value')} So as you can see my query params got table information as well.
In this case, filtering won't serve its purpose with the only SQL but it needs SQL with values. I've locally modified to see and it worked with loggable.getSqlWithValues(). I would like to see if this is a common case that needs to be rectified. If so I could give a PR too.
The text was updated successfully, but these errors were encountered:
In some cases, the statement is defined to take the query as bind parameters. See the following case.
if I take com.p6spy.engine.common.P6LogQuery#logElapsed(int, long, com.p6spy.engine.logging.Category, com.p6spy.engine.common.Loggable) method where i've loggable as CallableStatementInformation.
with that when I get loggable.getSql() it returns
{call [some_DB].[sys].[sp_executesql] (?,?,?)}
But if you take loggable.getSqlWithValues() it gives me{call [some_DB].[sys].[sp_executesql] ('SELECT [command] FROM spd.SomeTable WHERE [name]=@0','@0 varchar(4000)','some_value')}
So as you can see my query params got table information as well.In this case, filtering won't serve its purpose with the only SQL but it needs SQL with values. I've locally modified to see and it worked with loggable.getSqlWithValues(). I would like to see if this is a common case that needs to be rectified. If so I could give a PR too.
The text was updated successfully, but these errors were encountered: