Class QueryLogAdapter
QueryLogAdapter is an implementation of IAdapter which uses an existing adapter to execute the called methods while logging the query in a different adapter.
- Phramework\QueryLog\QueryLogAdapter implements Phramework\Database\IAdapter
Namespace: Phramework\QueryLog
License: Apache-2.0
Author: Xenofon Spafaridis nohponex@gmail.com
Located at QueryLogAdapter.php
License: Apache-2.0
Author: Xenofon Spafaridis nohponex@gmail.com
Located at QueryLogAdapter.php
Methods summary
public
|
#
__construct( array $settings, Phramework\Phramework\Database\IAdapter $internalAdapter, null|object|array $additionalParameters = null )
|
protected
|
#
log( string $query, array $parameters, integer $startTimestamp, null|Exception $exception = null )
Log query to database |
public
string
|
|
public
integer
|
|
public
integer
|
#
executeLastInsertId( string $query, array $parameters = [] )
Execute a query and return last instert id |
public
array
|
#
executeAndFetch( string $query, array $parameters = [], array $castModel = null )
Execute a query and fetch first row as associative array |
public
array[]
|
#
executeAndFetchAll( string $query, array $parameters = [], array $castModel = null )
Execute a query and fetch all rows as associative array |
public
array
|
#
executeAndFetchArray( string $query, array $parameters = [] )
Execute a query and fetch first row as array |
public
array[]
|
|
public
mixed
|
#
bindExecuteLastInsertId( string $query, array $parameters = [] )
Bind Execute a query and return last instert id |
public
integer
|
#
bindExecute( string $query, array $parameters = [] )
Bind Execute a query and return the row count |
public
array
|
#
bindExecuteAndFetch( string $query, array $parameters = [], array $castModel = null )
Bind Execute a query and fetch first row as associative array |
public
array[]
|
#
bindExecuteAndFetchAll( string $query, array $parameters = [], array $castModel = null )
Bind Execute a query and fetch all rows as associative array |
public
|
Constants summary
string |
LOG_INGORED
|
#
'IGNORED'
|
Properties summary
protected
Phramework\Database\IAdapter
|
$logAdapter
|
|
protected
Phramework\Database\IAdapter
|
$internalAdapter
|
|
protected
null|array|object
|
$additionalParameters
|
|
protected
null|string
|
$schema
Table's schema, null if default is used |
#
null
|
protected
string
|
$table
Table's name |
#
'query_log'
|
protected
object
|
$matrix
Log level matrix |