2017 © Pedro Peláez
 

library traceable-pdo

Wrapper for PDO that adds trace of statement source to analyze slow SQL statements in real-time

image

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

The README.md

traceable-pdo

Adds trace to your sql statement, (*1)

Build Status Latest Stable Version License, (*2)

Code Climate Test Coverage Total Downloads, (*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
    ],
...

The Versions

19/10 2017

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

  • php >=5.3

 

The Development Requires

by Anton Marin

sql pdo trace

22/01 2017

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

  • php >=5.3

 

The Development Requires

by Anton Marin

pdo trace