library traceable-pdo
Wrapper for PDO that adds trace of statement source to analyze slow SQL statements in real-time
antonmarin/traceable-pdo
Wrapper for PDO that adds trace of statement source to analyze slow SQL statements in real-time
- Thursday, October 19, 2017
- by antonmarin
- Repository
- 0 Watchers
- 0 Stars
- 3 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
traceable-pdo
Adds trace to your sql statement, (*1)
, (*2)
, (*3)
Usage
When you use traceablePDO\PDO
your statement looks like
SELECT 1 /* eJxT0NdSKM7PTVUoKUpMTlUoLinKzEtX0NIHAF05B60= */
so to get trace you should just enter in your terminal
php -r 'echo gzuncompress(base64_decode("eJxT0NdSKM7PTVUoKUpMTlUoLinKzEtX0NIHAF05B60="));'
, (*4)
Examples
Yii2
config/main.php, (*5)
...
'db' => [
'class' => yii\db\Connection::class,
'dsn' => 'mysql:host=localhost;dbname=stay2',
'username' => 'root',
'password' => 'pass',
'charset' => 'utf8',
'pdoClass' => antonmarin\TraceablePDO\PDO::class, // this line adds traces
],
...
dev-master
9999999-dev
Wrapper for PDO that adds trace of statement source to analyze slow SQL statements in real-time
Sources
Download
GPL-3.0
The Requires
The Development Requires
by
Anton Marin
sql
pdo
trace
v1.0.0
1.0.0.0
Wrapper for PDO that adds trace of statement sounce to analyze slow statements in real-time
Sources
Download
GPL-3.0
The Requires
The Development Requires
by
Anton Marin
pdo
trace