Property | Type | Description | |
---|---|---|---|
$connection | Doctrine\DBAL\Connection |
Method | Description | |
---|---|---|
__construct ( Doctrine\DBAL\Connection $connection ) | ||
alias ( $name, $alias ) : string | Custom alias method. | |
aliasedColumn ( eZ\Publish\Core\Persistence\Database\SelectQuery $query, string $columnName, string | null $tableName = null ) : string | Creates an alias for $tableName, $columnName in $query. | |
beginTransaction ( ) | Begin a transaction. | |
commit ( ) | Commit a transaction. | |
createConnectionFromDSN ( string | array $dsn ) : Doctrine\DBAL\Connection | ||
createDeleteQuery ( ) : eZ\Publish\Core\Persistence\Database\DeleteQuery | Create a Delete Query object. | |
createFromConnection ( Doctrine\DBAL\Connection $connection ) : |
Create a Connection Handler from given Doctrine $connection. | |
createFromDSN ( string | array $dsn ) : |
Create a Connection Handler with corresponding Doctrine connection from DSN. | |
createInsertQuery ( ) : eZ\Publish\Core\Persistence\Database\InsertQuery | Create Insert Query object. | |
createSelectQuery ( ) : eZ\Publish\Core\Persistence\Database\SelectQuery | Create Select Query object. | |
createUpdateQuery ( ) : eZ\Publish\Core\Persistence\Database\UpdateQuery | Create update Query object. | |
exec ( string $query ) | Execute a query against the database. | |
getAutoIncrementValue ( string $table, string $column ) : mixed | Get auto increment value. | |
getConnection ( ) : Doctrine\DBAL\Connection | ||
getName ( ) : string | ||
getSequenceName ( string $table, string $column ) : string | Returns the name of the affected sequence. | |
lastInsertId ( string $sequenceName = null ) : string | Retrieve the last auto incremet or sequence id. | |
parseDSN ( string $dsn ) : array | Returns the Data Source Name as a structure containing the various parts of the DSN. | |
prepare ( $query ) | ||
quoteColumn ( string $columnName, string $tableName = null ) : string | Returns a qualified identifier for $columnName in $tableName. | |
quoteIdentifier ( string $identifier ) : string | Custom quote identifier method. | |
quoteTable ( string $tableName ) : string | Returns a qualified identifier for $tableName. | |
rollBack ( ) | Rollback a transaction. | |
useSequences ( ) : boolean |
public __construct ( Doctrine\DBAL\Connection $connection ) | ||
$connection | Doctrine\DBAL\Connection |
public static createConnectionFromDSN ( string | array $dsn ) : Doctrine\DBAL\Connection | ||
$dsn | string | array | |
return | Doctrine\DBAL\Connection |
public createDeleteQuery ( ) : eZ\Publish\Core\Persistence\Database\DeleteQuery | ||
return | eZ\Publish\Core\Persistence\Database\DeleteQuery |
public static createFromConnection ( Doctrine\DBAL\Connection $connection ) : |
||
$connection | Doctrine\DBAL\Connection | |
return |
public static createFromDSN ( string | array $dsn ) : |
||
$dsn | string | array | |
return |
public createInsertQuery ( ) : eZ\Publish\Core\Persistence\Database\InsertQuery | ||
return | eZ\Publish\Core\Persistence\Database\InsertQuery |
public createSelectQuery ( ) : eZ\Publish\Core\Persistence\Database\SelectQuery | ||
return | eZ\Publish\Core\Persistence\Database\SelectQuery |
public createUpdateQuery ( ) : eZ\Publish\Core\Persistence\Database\UpdateQuery | ||
return | eZ\Publish\Core\Persistence\Database\UpdateQuery |
public getConnection ( ) : Doctrine\DBAL\Connection | ||
return | Doctrine\DBAL\Connection |
public lastInsertId ( string $sequenceName = null ) : string | ||
$sequenceName | string | |
return | string |
driver://user:password@protocol+host/database?option=8&another=true
Most variations are allowed:
driver://user:password@protocol+host:110//usr/db_file.db?mode=0644
driver://user:password@host/dbname
driver://user:password@host
driver://user@host
driver://host/dbname
driver://host
driver
This function is 'borrowed' from PEAR /DB.php . public static parseDSN ( string $dsn ) : array | ||
$dsn | string | Data Source Name to be parsed |
return | array | an associative array with the following keys: + driver: Database backend used in PHP (mysql, odbc etc.) + host: Host specification (hostname[:port]) + dbname: Database to use on the DBMS server + username: User name for login + password: Password for login |
public quoteIdentifier ( string $identifier ) : string | ||
$identifier | string | |
return | string |
public quoteTable ( string $tableName ) : string | ||
$tableName | string | |
return | string |