1. Go to this page and download the library: Download forrest79/phpgsql-nette library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
forrest79 / phpgsql-nette example snippets
$tracyBar = Tracy\Debugger::getBar(); // or instance get from DI container or somewhere else
$connection = new Forrest79\PhPgSql\Db\Connection(); // or instance get from DI container or somewhere else
$queryDumper = new PhPgSql\Tracy\QueryDumpers\SqlFormatter(); // or some other query dumper
$name = 'Main connection'; // just to recognize two different bars
$barPanel = PhPgSql\Tracy\BarPanel::initialize(
$tracyBar,
$connection,
$queryDumper,
$name,
explain: false, // when true, explain is execute and show for all queries
notices: false, // when true, notices are get from the database and show with the queries
longQueryTimeMs: null, // if you set some value in miliseconds, long running queries will be marked
detectRepeatingQueries: false, // when true, repeating queries will be detected and marked
detectNonParsedColumns: false, // when true, non-used columns wil be detected and show for each query
backtraceContinueIterate: null, // used for detection where the query was executed in the PHP code - callable, more about this later
showMaxLastQueries: null, // show only last queries, when null - default value of 1000 queries is used, selected value otherwise
);
// To disable bar panel
$barPanel->disable();
$tracyBlueScreen = Tracy\Debugger::getBlueScreen(); // or instance get from DI container or somewhere else
$queryDumper = new PhPgSql\Tracy\QueryDumpers\SqlFormatter(); // or some other query dumper
PhPgSql\Tracy\BlueScreenPanel::initialize($tracyBlueScreen, $queryDumper);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.