Connection
Connection implements Connection
Database Connection.
- Full name: \Gibbon\Database\Connection
- This class implements: Warning: strrchr() expects parameter 1 to be string, object given in /Users/sankuipe/Desktop/Localhost/documentor/src/Extension/TwigMarkdownAnchorLink.php on line 108
Methods
- __construct — Create the connection wrapper around a \PDO instance.
- getConnection — Get the current PDO connection.
- selectOne — Run a select statement and return a single result.
- select — Run a select statement against the database.
- insert — Run an insert statement and return the last insert ID.
- update — Run an update statement against the database.
- delete — Run a delete statement against the database.
- statement — Execute an SQL statement and return the boolean result.
- affectingStatement — Run an SQL statement and get the number of rows affected.
- executeQuery
- getQuerySuccess
- getResult
__construct
Create the connection wrapper around a \PDO instance.
Connection::__construct( \PDO $pdo, array $config = array() )
getConnection
Get the current PDO connection.
Connection::getConnection( ): \PDO
Return Value:
\PDO
selectOne
Run a select statement and return a single result.
Connection::selectOne( string $query, array $bindings = array() ): mixed
Return Value:
mixed
select
Run a select statement against the database.
Connection::select( string $query, array $bindings = array() ): array
Return Value:
array
insert
Run an insert statement and return the last insert ID.
Connection::insert( string $query, array $bindings = array() ): integer
Return Value:
integer
update
Run an update statement against the database.
Connection::update( string $query, array $bindings = array() ): integer
Return Value:
integer
delete
Run a delete statement against the database.
Connection::delete( string $query, array $bindings = array() ): integer
Return Value:
integer
statement
Execute an SQL statement and return the boolean result.
Connection::statement( string $query, array $bindings = array() ): boolean
Return Value:
boolean
affectingStatement
Run an SQL statement and get the number of rows affected.
Connection::affectingStatement( string $query, array $bindings = array() ): integer
Return Value:
integer
executeQuery
Connection::executeQuery( $data, string $query, $error = null ): \PDOStatement
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
Return Value:
\PDOStatement
getQuerySuccess
Connection::getQuerySuccess( ): boolean
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
Return Value:
boolean
getResult
Connection::getResult( ): \PDOStatement
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
Return Value:
\PDOStatement