[ Index ]
 

Code source de Symfony 1.0.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/addon/creole/drivers/ -> sfDebugConnection.php (sommaire)

(pas de description)

Poids: 294 lignes (7 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

sfDebugConnection:: (25 méthodes):
  setLogger()
  getNumQueriesExecuted()
  getLastExecutedQuery()
  connect()
  getDatabaseInfo()
  getIdGenerator()
  isConnected()
  prepareStatement()
  createStatement()
  applyLimit()
  close()
  executeQuery()
  executeUpdate()
  getUpdateCount()
  prepareCall()
  getResource()
  getDSN()
  getFlags()
  begin()
  commit()
  rollback()
  setAutoCommit()
  getAutoCommit()
  log()
  __call()


Classe: sfDebugConnection  - X-Ref

Debug implementation of Connection.

This is a Connection that implements the decorator pattern, wrapping around
the true Connection object (stored in $childConnection). This Connection
tracks information about queries executed and makes that information available
for debugging purposes. The information tracked is the last query executed
on the connection (getLastExecutedQuery()) and the total number of
queries executed on the connection thus far (getNumQueriesExecuted()).

To use this debug connection, you need to register it as a new Creole
driver that handles all connection types. To do this, call the following
before calling Creole::getConnection():

<code>
Creole::registerDriver('*', 'creole.drivers.debug.DebugConnection');
</code>

The next call to Creole::getConnection() will return an instance of
DebugConnection.

setLogger($logger)   X-Ref
Sets a Logger class (e.g. PEAR Log) to use for logging.
The logger class must have a log() method.  All messages are logged at default log level.

param: object $logger

getNumQueriesExecuted()   X-Ref
Returns the number of queries executed on this connection so far

return: int

getLastExecutedQuery()   X-Ref
Returns the last query executed on this connection

return: string

connect($dsninfo, $flags = 0)   X-Ref
connect()


getDatabaseInfo()   X-Ref


getIdGenerator()   X-Ref


isConnected()   X-Ref


prepareStatement($sql)   X-Ref


createStatement()   X-Ref


applyLimit(&$sql, $offset, $limit)   X-Ref


close()   X-Ref


executeQuery($sql, $fetchmode = null)   X-Ref


executeUpdate($sql)   X-Ref


getUpdateCount()   X-Ref


prepareCall($sql)   X-Ref


getResource()   X-Ref


getDSN()   X-Ref


getFlags()   X-Ref


begin()   X-Ref


commit()   X-Ref


rollback()   X-Ref


setAutoCommit($bit)   X-Ref


getAutoCommit()   X-Ref


log($msg)   X-Ref
Private function that logs message using specified logger (if provided).

param: string $msg Message to log.

__call($method, $arguments)   X-Ref
Pas de description



Généré le : Fri Mar 16 22:42:14 2007 par Balluche grâce à PHPXref 0.7