Open hoehrmann opened 6 years ago
Not sure if anything has changed here since, but running into this again I noticed that DBD::SQLite
would not take the shortcut if the second argument to do
is defined, but passing {}
did not actually help because dbi_profile
returns early when it notices the DBI calls are not from application code. So it is not clear to me that drivers actually have a chance to make this work properly. Removing the caller-logic from dbi_profile
then did the trick.
dbi_profile
does not capture the current statement when drivers do not funneldo
through a separate statement object. For instance, this is broken:This profiles the second
do
with the empty string as statement. For the first one the behavior is as expected becauseDBD::SQLite
routes that throughprepare
et al. WithDBD::Pg
instead, you get an empty string for both statements (I suspect for similar reasons, but haven't checked).If drivers are not supposed to skip prepare/execute on specialised
do
implementations, could this be noted in theDBI::DBD
documentation?