Doctrine\DBAL\Portability\Connection
Synopsis
class Connection
extends Connection
{
- // constants
- const PORTABILITY_ALL = 255;
- const PORTABILITY_NONE = 0;
- const PORTABILITY_RTRIM = 1;
- const PORTABILITY_EMPTY_TO_NULL = 4;
- const PORTABILITY_FIX_CASE = 8;
- const PORTABILITY_ORACLE = 9;
- const PORTABILITY_POSTGRESQL = 13;
- const PORTABILITY_SQLITE = 13;
- const PORTABILITY_OTHERVENDORS = 12;
- const PORTABILITY_DRIZZLE = 13;
- const PORTABILITY_SQLSRV = 13;
- // Inherited constants from Connection
- const TRANSACTION_READ_UNCOMMITTED = 1;
- const TRANSACTION_READ_COMMITTED = 2;
- const TRANSACTION_REPEATABLE_READ = 3;
- const TRANSACTION_SERIALIZABLE = 4;
- const PARAM_INT_ARRAY = 101;
- const PARAM_STR_ARRAY = 102;
- const ARRAY_PARAM_OFFSET = 100;
- // members
- private int $portability;
- private int $case;
- // Inherited members from Connection
- protected Connection $_conn;
- protected Configuration $_config;
- protected EventManager $_eventManager;
- protected ExpressionBuilder $_expr;
- protected AbstractPlatform $_platform;
- protected AbstractSchemaManager $_schemaManager;
- protected Driver $_driver;
- // methods
- public void connect()
- public void getPortability()
- public void getFetchCase()
- public void executeQuery()
- public Statement prepare()
- public void query()
- // Inherited methods from Connection
- public void __construct()
- public array getParams()
- public string getDatabase()
- public string getHost()
- public mixed getPort()
- public string getUsername()
- public string getPassword()
- public Driver getDriver()
- public Configuration getConfiguration()
- public EventManager getEventManager()
- public AbstractPlatform getDatabasePlatform()
- public ExpressionBuilder getExpressionBuilder()
- public boolean connect()
- public void setFetchMode()
- public array fetchAssoc()
- public array fetchArray()
- public mixed fetchColumn()
- public boolean isConnected()
- public boolean isTransactionActive()
- public integer delete()
- public void close()
- public integer setTransactionIsolation()
- public integer getTransactionIsolation()
- public integer update()
- public integer insert()
- public string quoteIdentifier()
- public string quote()
- public array fetchAll()
- public Statement prepare()
- public Statement executeQuery()
- public ResultStatement executeCacheQuery()
- public mixed project()
- public Statement query()
- public integer executeUpdate()
- public integer exec()
- public integer getTransactionNestingLevel()
- public integer errorCode()
- public array errorInfo()
- public string lastInsertId()
- public void transactional()
- public void setNestTransactionsWithSavepoints()
- public boolean getNestTransactionsWithSavepoints()
- protected mixed _getNestedTransactionSavePointName()
- public void beginTransaction()
- public void commit()
- public void rollBack()
- public void createSavepoint()
- public void releaseSavepoint()
- public void rollbackSavepoint()
- public Connection getWrappedConnection()
- public AbstractSchemaManager getSchemaManager()
- public void setRollbackOnly()
- public boolean isRollbackOnly()
- public mixed convertToDatabaseValue()
- public mixed convertToPHPValue()
- public array resolveParams()
- public QueryBuilder createQueryBuilder()
Hierarchy
Extends
Constants
Name | Value |
---|---|
PORTABILITY_ALL | 255 |
PORTABILITY_NONE | 0 |
PORTABILITY_RTRIM | 1 |
PORTABILITY_EMPTY_TO_NULL | 4 |
PORTABILITY_FIX_CASE | 8 |
PORTABILITY_ORACLE | 9 |
PORTABILITY_POSTGRESQL | 13 |
PORTABILITY_SQLITE | 13 |
PORTABILITY_OTHERVENDORS | 12 |
PORTABILITY_DRIZZLE | 13 |
PORTABILITY_SQLSRV | 13 |
TRANSACTION_READ_UNCOMMITTED | 1 |
TRANSACTION_READ_COMMITTED | 2 |
TRANSACTION_REPEATABLE_READ | 3 |
TRANSACTION_SERIALIZABLE | 4 |
PARAM_INT_ARRAY | 101 |
PARAM_STR_ARRAY | 102 |
ARRAY_PARAM_OFFSET | 100 |
Members
private
- $case — int
- $portability — int
protected
- $_config — \Doctrine\DBAL\Configuration
- $_conn
—
\Doctrine\DBAL\Driver\Connection
The wrapped driver connection. - $_driver
—
\Doctrine\DBAL\Driver
The used DBAL driver. - $_eventManager — \Doctrine\Common\EventManager
- $_expr — \Doctrine\DBAL\Query\Expression\ExpressionBuilder
- $_platform
—
\Doctrine\DBAL\Platforms\AbstractPlatform
The DatabasePlatform object that provides information about the database platform used by the connection. - $_schemaManager
—
\Doctrine\DBAL\Schema\AbstractSchemaManager
The schema manager.
Methods
public
- connect()
- executeQuery()
- getFetchCase()
- getPortability()
- prepare() — Prepares an SQL statement.
- query()
Inherited from Doctrine\DBAL\Connection
protected
- _getNestedTransactionSavePointName() — Returns the savepoint name to use for nested transactions are false if they are not supported "savepointFormat" parameter is not set
public
- beginTransaction() — Starts a transaction by suspending auto-commit mode.
- close() — Closes the connection.
- commit() — Commits the current transaction.
- connect() — Establishes the connection with the database.
- convertToDatabaseValue() — Converts a given value to its database representation according to the conversion rules of a specific DBAL mapping type.
- convertToPHPValue() — Converts a given value to its PHP representation according to the conversion rules of a specific DBAL mapping type.
- createQueryBuilder() — Create a new instance of a SQL query builder.
- createSavepoint() — createSavepoint creates a new savepoint
- delete() — Executes an SQL DELETE statement on a table.
- errorCode() — Fetch the SQLSTATE associated with the last database operation.
- errorInfo() — Fetch extended error information associated with the last database operation.
- exec() — Execute an SQL statement and return the number of affected rows.
- executeCacheQuery() — Execute a caching query and
- executeQuery() — Executes an, optionally parameterized, SQL query.
- executeUpdate() — Executes an SQL INSERT/UPDATE/DELETE query with the given parameters and returns the number of affected rows.
- fetchAll() — Prepares and executes an SQL query and returns the result as an associative array.
- fetchArray() — Prepares and executes an SQL query and returns the first row of the result as a numerically indexed array.
- fetchAssoc() — Prepares and executes an SQL query and returns the first row of the result as an associative array.
- fetchColumn() — Prepares and executes an SQL query and returns the value of a single column of the first row of the result.
- getConfiguration() — Gets the Configuration used by the Connection.
- getDatabase() — Gets the name of the database this Connection is connected to.
- getDatabasePlatform() — Gets the DatabasePlatform for the connection.
- getDriver() — Gets the DBAL driver instance.
- getEventManager() — Gets the EventManager used by the Connection.
- getExpressionBuilder() — Gets the ExpressionBuilder for the connection.
- getHost() — Gets the hostname of the currently connected database.
- getNestTransactionsWithSavepoints() — Get if nested transactions should use savepoints
- getParams() — Gets the parameters used during instantiation.
- getPassword() — Gets the password used by this connection.
- getPort() — Gets the port of the currently connected database.
- getSchemaManager() — Gets the SchemaManager that can be used to inspect or change the database schema through the connection.
- getTransactionIsolation() — Gets the currently active transaction isolation level.
- getTransactionNestingLevel() — Returns the current transaction nesting level.
- getUsername() — Gets the username used by this connection.
- getWrappedConnection() — Gets the wrapped driver connection.
- insert() — Inserts a table row with specified data.
- isConnected() — Whether an actual connection to the database is established.
- isRollbackOnly() — Check whether the current transaction is marked for rollback only.
- isTransactionActive() — Checks whether a transaction is currently active.
- lastInsertId() — Returns the ID of the last inserted row, or the last value from a sequence object, depending on the underlying driver.
- prepare() — Prepares an SQL statement.
- project() — Executes an, optionally parameterized, SQL query and returns the result, applying a given projection/transformation function on each row of the result.
- query() — Executes an SQL statement, returning a result set as a Statement object.
- quote() — Quotes a given input parameter.
- quoteIdentifier() — Quote a string so it can be safely used as a table or column name, even if it is a reserved name.
- releaseSavepoint() — releaseSavePoint releases given savepoint
- resolveParams() — Resolves the parameters to a format which can be displayed.
- rollBack() — Cancel any database changes done during the current transaction.
- rollbackSavepoint() — rollbackSavePoint releases given savepoint
- setFetchMode() — setFetchMode
- setNestTransactionsWithSavepoints() — Set if nested transactions should use savepoints
- setRollbackOnly() — Marks the current transaction so that the only possible outcome for the transaction to be rolled back.
- setTransactionIsolation() — Sets the transaction isolation level.
- transactional() — Executes a function in a transaction.
- update() — Executes an SQL UPDATE statement on a table.