$pdo
$pdo : \PDO
A PDO proxy which traces statements
exec(string $statement) : integer|boolean
Execute an SQL statement and return the number of affected rows
string | $statement |
PDO::exec returns the number of rows that were modified or deleted by the SQL statement you issued. If no rows were affected, PDO::exec returns 0. This function may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE. Please read the section on Booleans for more information
lastInsertId(string $name = null) : string
Returns the ID of the last inserted row or sequence value
string | $name | [optional] |
If a sequence name was not specified for the name parameter, PDO::lastInsertId returns a string representing the row ID of the last row that was inserted into the database.
prepare(string $statement, array $driver_options = array()) : \DebugBar\DataCollector\PDO\TraceablePDOStatement|boolean
Prepares a statement for execution and returns a statement object
string | $statement | This must be a valid SQL statement template for the target DB server. |
array | $driver_options | [optional] This array holds one or more key=>value pairs to set attribute values for the PDOStatement object that this method returns. |
If the database server successfully prepares the statement, PDO::prepare returns a PDOStatement object. If the database server cannot successfully prepare the statement, PDO::prepare returns FALSE or emits PDOException (depending on error handling).
query(string $statement) : \DebugBar\DataCollector\PDO\TraceablePDOStatement|boolean
Executes an SQL statement, returning a result set as a PDOStatement object
string | $statement |
PDO::query returns a PDOStatement object, or FALSE on failure.
quote(string $string, integer $parameter_type = \PDO::PARAM_STR) : string|boolean
Quotes a string for use in a query.
string | $string | The string to be quoted. |
integer | $parameter_type | [optional] Provides a data type hint for drivers that have alternate quoting styles. |
A quoted string that is theoretically safe to pass into an SQL statement. Returns FALSE if the driver does not support quoting in this way.
addExecutedStatement(\DebugBar\DataCollector\PDO\TracedStatement $stmt)
Adds an executed TracedStatement
\DebugBar\DataCollector\PDO\TracedStatement | $stmt |