[ Index ] |
PHP Cross Reference of YOURLS |
[Source view] [Print] [Project Stats]
This file is part of Aura for PHP.
License: | https://opensource.org/licenses/MIT MIT |
File Size: | 412 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
ExtendedPdoInterface:: (27 methods):
connect()
disconnect()
fetchAffected()
fetchAll()
fetchAssoc()
fetchCol()
fetchGroup()
fetchObject()
fetchObjects()
fetchOne()
fetchPairs()
fetchValue()
getParser()
getPdo()
getProfiler()
quoteName()
quoteSingleName()
isConnected()
setParser()
setProfiler()
yieldAll()
yieldAssoc()
yieldCol()
yieldObjects()
yieldPairs()
perform()
prepareWithValues()
Interface: ExtendedPdoInterface - X-Ref
An interface to the Aura.Sql extended PDO object.connect() X-Ref |
Connects to the database. |
disconnect() X-Ref |
Disconnects from the database. |
fetchAffected($statement, array $values = []) X-Ref |
Performs a statement and returns the number of affected rows. return: int param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. |
fetchAll($statement, array $values = []) X-Ref |
Fetches a sequential array of rows from the database; the rows are represented as associative arrays. return: array param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. |
fetchAssoc($statement, array $values = []) X-Ref |
Fetches an associative array of rows from the database; the rows are represented as associative arrays. The array of rows is keyed on the first column of each row. N.b.: if multiple rows have the same first column value, the last row with that value will override earlier rows. return: array param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. |
fetchCol($statement, array $values = []) X-Ref |
Fetches the first column of rows as a sequential array. return: array param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. |
fetchGroup($statement,array $values = [],$style = PDO::FETCH_COLUMN) X-Ref |
Fetches multiple from the database as an associative array. The first column will be the index return: array param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. param: int $style a fetch style defaults to PDO::FETCH_COLUMN for single |
fetchObject($statement,array $values = [],$class = 'stdClass',array $args = []) X-Ref |
Fetches one row from the database as an object, mapping column values to object properties. Warning: PDO "injects property-values BEFORE invoking the constructor - in other words, if your class initializes property-values to defaults in the constructor, you will be overwriting the values injected by fetchObject() !" <http://www.php.net/manual/en/pdostatement.fetchobject.php#111744> return: object param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. param: string $class The name of the class to create. param: array $args Arguments to pass to the object constructor. |
fetchObjects($statement,array $values = [],$class = 'stdClass',array $args = []) X-Ref |
Fetches a sequential array of rows from the database; the rows are represented as objects, where the column values are mapped to object properties. Warning: PDO "injects property-values BEFORE invoking the constructor - in other words, if your class initializes property-values to defaults in the constructor, you will be overwriting the values injected by fetchObject() !" <http://www.php.net/manual/en/pdostatement.fetchobject.php#111744> return: array param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. param: string $class The name of the class to create from each param: array $args Arguments to pass to each object constructor. |
fetchOne($statement, array $values = []) X-Ref |
Fetches one row from the database as an associative array. return: array param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. |
fetchPairs($statement, array $values = []) X-Ref |
Fetches an associative array of rows as key-value pairs (first column is the key, second column is the value). return: array param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. |
fetchValue($statement, array $values = []) X-Ref |
Fetches the very first value (i.e., first column of the first row). return: mixed param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. |
getParser() X-Ref |
Returns the Parser instance. return: ParserInterface |
getPdo() X-Ref |
Return the inner PDO (if any) return: \PDO |
getProfiler() X-Ref |
Returns the Profiler instance. return: ProfilerInterface |
quoteName($name) X-Ref |
Quotes a multi-part (dotted) identifier name. return: string The multi-part identifier name, quoted. param: string $name The multi-part identifier name. |
quoteSingleName($name) X-Ref |
Quotes a single identifier name. return: string The quoted identifier name. param: string $name The identifier name. |
isConnected() X-Ref |
Is the PDO connection active? return: bool |
setParser(ParserInterface $parser) X-Ref |
Sets the Parser instance. param: ParserInterface $parser The Parser instance. |
setProfiler(ProfilerInterface $profiler) X-Ref |
Sets the Profiler instance. param: ProfilerInterface $profiler The Profiler instance. |
yieldAll($statement, array $values = []) X-Ref |
Yields rows from the database return: \Generator param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. |
yieldAssoc($statement, array $values = []) X-Ref |
Yields rows from the database keyed on the first column of each row. return: \Generator param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. |
yieldCol($statement, array $values = []) X-Ref |
Yields the first column of all rows return: \Generator param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. |
yieldObjects($statement,array $values = [],$class = 'stdClass',array $args = []) X-Ref |
Yields objects where the column values are mapped to object properties. Warning: PDO "injects property-values BEFORE invoking the constructor - in other words, if your class initializes property-values to defaults in the constructor, you will be overwriting the values injected by fetchObject() !" <http://www.php.net/manual/en/pdostatement.fetchobject.php#111744> return: \Generator param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. param: string $class The name of the class to create from each param: array $args Arguments to pass to each object constructor. |
yieldPairs($statement, array $values = []) X-Ref |
Yields key-value pairs (first column is the key, second column is the value). return: \Generator param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. |
perform($statement, array $values = []) X-Ref |
Performs a query after preparing the statement with bound values, then returns the result as a PDOStatement. return: \PDOStatement param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. |
prepareWithValues($statement, array $values = []) X-Ref |
Prepares an SQL statement with bound values. This method only binds values that have placeholders in the statement, thereby avoiding errors from PDO regarding too many bound values. It also binds all sequential (question-mark) placeholders. If a placeholder value is an array, the array is converted to a string of comma-separated quoted values; e.g., for an `IN (...)` condition. The quoted string is replaced directly into the statement instead of using `PDOStatement::bindValue()` proper. return: \PDOStatement param: string $statement The SQL statement to prepare for execution. param: array $values The values to bind to the statement, if any. |
Generated: Tue Jan 21 05:10:11 2025 | Cross-referenced by PHPXref 0.7.1 |