-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query params substitution #21
Comments
So |
Actually, there already is an option to substitue the parameters in a TracedStatement, I'll check why that isn't used. |
Looks like this has been enabled now php-debugbar/php-debugbar@f5cb5a1 Wasn't sure if you wanted to expose this config value in the laravel version, but something like this would probably work (untested): if($this->collects('db', true) and isset($this->app['db'])){
try{
$pdo = new TraceablePDO( $this->app['db']->getPdo());
$collector = new PDOCollector($pdo);
$collector->setRenderSqlWithParams($this->app['config']->get('laravel-debugbar::config.render_sql_with_params', true));
$debugbar->addCollector($collector);
}catch(\PDOException $e){
//Not connection set..
}
} |
Yeah I'll make a config for this.
|
Added a config for this, probably need to re-publish your config, but it's on by default. |
Awesome, thanks |
Hey Barry, just tried this out for the first time. Is there a reason that the params are surrounded with select * from `users` where `id` = <26313> limit 1 I'm guessing that this is a phpdebugbar issue? |
Yeah I said that here: php-debugbar/php-debugbar#38 |
Default is now ', but it is an option in the latest version. |
Awesome :) |
It would be great if this could automatically substitute the params for each query into the query string
The text was updated successfully, but these errors were encountered: