class ProfilerStatementWrapper extends StatementWrapper
Statement class with profiling abilities.
Methods
__construct(string $sql, ConnectionWrapper $connection, array $options = array())
Creates a Statement instance |
from StatementWrapper | |
boolean |
bindParam(integer $pos, mixed $value, integer $type = \PDO::PARAM_STR, integer $length, mixed $driver_options = null)
Binds a PHP variable to a corresponding named or question mark placeholder in the SQL statement that was use to prepare the statement. |
|
boolean |
bindValue(integer $pos, mixed $value, integer $type = \PDO::PARAM_STR)
Binds a value to a corresponding named or question mark placeholder in the SQL statement that was use to prepare the statement. |
|
boolean |
closeCursor()
Closes the cursor, enabling the statement to be executed again. |
from StatementWrapper |
integer |
columnCount()
Returns the number of columns in the result set. |
from StatementWrapper |
boolean |
execute(string $input_parameters = null)
Executes a prepared statement. |
|
string | getExecutedQueryString() | from StatementWrapper |
mixed |
fetch(integer $fetchStyle = 4)
Fetches the next row from a result set. |
from StatementWrapper |
array |
fetchAll(integer $fetchStyle = 4)
Returns an array containing all of the result set rows. |
from StatementWrapper |
string |
fetchColumn(integer $columnIndex)
Returns a single column from the next row of a result set. |
from StatementWrapper |
integer |
rowCount()
Returns the number of rows affected by the last SQL statement |
from StatementWrapper |
Traversable |
getIterator()
Return the internal statement, which is traversable |
from StatementWrapper |
__call($method, $args) | from StatementWrapper |
Details
in StatementWrapper at line 61
public
__construct(string $sql, ConnectionWrapper $connection, array $options = array())
Creates a Statement instance
at line 32
public boolean
bindParam(integer $pos, mixed $value, integer $type = \PDO::PARAM_STR, integer $length, mixed $driver_options = null)
Binds a PHP variable to a corresponding named or question mark placeholder in the SQL statement that was use to prepare the statement.
Unlike PDOStatement::bindValue(), the variable is bound
as a reference and will only be evaluated at the time that PDOStatement::execute() is called.
Returns a boolean value indicating success.
at line 49
public boolean
bindValue(integer $pos, mixed $value, integer $type = \PDO::PARAM_STR)
Binds a value to a corresponding named or question mark placeholder in the SQL statement that was use to prepare the statement.
Returns a boolean value indicating success.
in StatementWrapper at line 133
public boolean
closeCursor()
Closes the cursor, enabling the statement to be executed again.
closeCursor() frees up the connection to the server so that other SQL
statements may be issued, but leaves the statement in a state that enables
it to be executed again.
This method is useful for database drivers that do not support executing
a PDOStatement object when a previously executed PDOStatement object still
has unfetched rows. If your database driver suffers from this limitation,
the problem may manifest itself in an out-of-sequence error.
in StatementWrapper at line 155
public integer
columnCount()
Returns the number of columns in the result set.
Use columnCount() to return the number of columns in the result set
represented by the Statement object.
If the Statement object was returned from PDO::query(), the column count
is immediately available.
If the Statement object was returned from PDO::prepare(), an accurate
column count will not be available until you invoke Statement::execute().
Returns the number of columns in the result set
at line 63
public boolean
execute(string $input_parameters = null)
Executes a prepared statement.
Returns a boolean value indicating success.
Overridden for query counting and logging.
in StatementWrapper at line 185
public string
getExecutedQueryString()
in StatementWrapper at line 210
public mixed
fetch(integer $fetchStyle = 4)
Fetches the next row from a result set.
Fetches a row from a result set associated with a Statement object.
The fetch_style parameter determines how the Connection returns the row.
in StatementWrapper at line 222
public array
fetchAll(integer $fetchStyle = 4)
Returns an array containing all of the result set rows.
in StatementWrapper at line 236
public string
fetchColumn(integer $columnIndex)
Returns a single column from the next row of a result set.
in StatementWrapper at line 254
public integer
rowCount()
Returns the number of rows affected by the last SQL statement
rowCount() returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement
executed by the corresponding Statement object.
If the last SQL statement executed by the associated Statement object was a SELECT statement,
some databases may return the number of rows returned by that statement. However,
this behaviour is not guaranteed for all databases and should not be
relied on for portable applications.
in StatementWrapper at line 264
public Traversable
getIterator()
Return the internal statement, which is traversable