diff --git a/src/DBAL/Middleware/LaravelDebugbarLogging/Connection.php b/src/DBAL/Middleware/LaravelDebugbarLogging/Connection.php new file mode 100644 index 00000000..39b0adb3 --- /dev/null +++ b/src/DBAL/Middleware/LaravelDebugbarLogging/Connection.php @@ -0,0 +1,28 @@ +time(fn() => parent::query($sql), $sql); + } +} diff --git a/src/DBAL/Middleware/LaravelDebugbarLogging/Driver.php b/src/DBAL/Middleware/LaravelDebugbarLogging/Driver.php new file mode 100644 index 00000000..20f89804 --- /dev/null +++ b/src/DBAL/Middleware/LaravelDebugbarLogging/Driver.php @@ -0,0 +1,16 @@ +params[$param] = $value; + + return parent::bindValue($param, $value, $type); + } + + /** + * {@inheritDoc} + */ + public function execute($params = null): Result + { + return $this->time(fn() => parent::execute($params), $this->sql, $this->params); + } +}