1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-04 13:17:58 +02:00

- added DibiProfiler (experimental)

- removed dibi::addHandler() & dibi::startLogger()
This commit is contained in:
David Grudl
2008-10-22 11:44:11 +00:00
parent 1e33b67e37
commit 32dd3969a3
8 changed files with 337 additions and 179 deletions

View File

@@ -29,7 +29,7 @@ interface IDibiVariable
/**
* Format for SQL.
*
* @param object DibiTranslator
* @param DibiTranslator
* @param string optional modifier
* @return string SQL code
*/
@@ -54,6 +54,57 @@ interface IDataSource extends Countable, IteratorAggregate
/**
* Defines method that must profiler implement.
* @package dibi
*/
interface IDibiProfiler
{
/**#@+ event type */
const CONNECT = 1;
const SELECT = 4;
const INSERT = 8;
const DELETE = 16;
const UPDATE = 32;
const QUERY = 60;
const BEGIN = 64;
const COMMIT = 128;
const ROLLBACK = 256;
const TRANSACTION = 448;
const EXCEPTION = 512;
const ALL = 1023;
/**#@-*/
/**
* Before event notification.
* @param DibiConnection
* @param int event name
* @param string sql
* @return int
*/
function before(DibiConnection $connection, $event, $sql = NULL);
/**
* After event notification.
* @param int
* @param DibiResult
* @return void
*/
function after($ticket, $result = NULL);
/**
* After exception notification.
* @param DibiDriverException
* @return void
*/
function exception(DibiDriverException $exception);
}
/**
* dibi driver interface.
*