[ 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: | 414 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
ExtendedPdoInterface:: (27 methods):
lazyConnect()
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.lazyConnect() X-Ref |
Connects to the database. |
disconnect() X-Ref |
Disconnects from the database. |
fetchAffected(string $statement, array $values = []) X-Ref |
Performs a statement and returns the number of affected rows. param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. return: int |
fetchAll(string $statement, array $values = []) X-Ref |
Fetches a sequential array of rows from the database; the rows are represented as associative arrays. param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. return: array |
fetchAssoc(string $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. param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. return: array |
fetchCol(string $statement, array $values = []) X-Ref |
Fetches the first column of rows as a sequential array. param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. return: array |
fetchGroup(string $statement,array $values = [],int $style = PDO::FETCH_COLUMN) X-Ref |
Fetches multiple from the database as an associative array. The first column will be the index 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 return: array |
fetchObject(string $statement,array $values = [],string $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> 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. return: object|false |
fetchObjects(string $statement,array $values = [],string $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> 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. return: array |
fetchOne(string $statement, array $values = []) X-Ref |
Fetches one row from the database as an associative array. param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. return: array|false |
fetchPairs(string $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). param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. return: array |
fetchValue(string $statement, array $values = []) X-Ref |
Fetches the very first value (i.e., first column of the first row). param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. return: mixed |
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(string $name) X-Ref |
Quotes a multi-part (dotted) identifier name. param: string $name The multi-part identifier name. return: string The multi-part identifier name, quoted. |
quoteSingleName(string $name) X-Ref |
Quotes a single identifier name. param: string $name The identifier name. return: string The quoted 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(string $statement, array $values = []) X-Ref |
Yields rows from the database param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. return: \Generator |
yieldAssoc(string $statement, array $values = []) X-Ref |
Yields rows from the database keyed on the first column of each row. param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. return: \Generator |
yieldCol(string $statement, array $values = []) X-Ref |
Yields the first column of all rows param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. return: \Generator |
yieldObjects(string $statement,array $values = [],string $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> 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. return: \Generator |
yieldPairs(string $statement, array $values = []) X-Ref |
Yields key-value pairs (first column is the key, second column is the value). param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. return: \Generator |
perform(string $statement, array $values = []) X-Ref |
Performs a query after preparing the statement with bound values, then returns the result as a PDOStatement. param: string $statement The SQL statement to prepare and execute. param: array $values Values to bind to the query. return: \PDOStatement |
prepareWithValues(string $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. param: string $statement The SQL statement to prepare for execution. param: array $values The values to bind to the statement, if any. return: \PDOStatement |
Generated: Sat Apr 26 05:10:07 2025 | Cross-referenced by PHPXref 0.7.1 |