Drupal 8  8.0.2
Connection Class Reference
Inheritance diagram for Connection:

Public Member Functions

 __construct (\PDO $connection, array $connection_options=array())
 
 query ($query, array $args=array(), $options=array())
 
 serialize ()
 
 __destruct ()
 
 queryRange ($query, $from, $count, array $args=array(), array $options=array())
 
 queryTemporary ($query, array $args=array(), array $options=array())
 
 driver ()
 
 databaseType ()
 
 createDatabase ($database)
 
 mapConditionOperator ($operator)
 
 nextId ($existing_id=0)
 
 nextIdDelete ()
 
- Public Member Functions inherited from Connection
 __construct (\PDO $connection, array $connection_options)
 
 destroy ()
 
 getConnectionOptions ()
 
 prefixTables ($sql)
 
 tablePrefix ($table= 'default')
 
 getUnprefixedTablesMap ()
 
 getFullQualifiedTableName ($table)
 
 prepareQuery ($query)
 
 setTarget ($target=NULL)
 
 getTarget ()
 
 setKey ($key)
 
 getKey ()
 
 setLogger (Log $logger)
 
 getLogger ()
 
 makeSequenceName ($table, $field)
 
 makeComment ($comments)
 
 query ($query, array $args=array(), $options=array())
 
 getDriverClass ($class)
 
 select ($table, $alias=NULL, array $options=array())
 
 insert ($table, array $options=array())
 
 merge ($table, array $options=array())
 
 upsert ($table, array $options=array())
 
 update ($table, array $options=array())
 
 delete ($table, array $options=array())
 
 truncate ($table, array $options=array())
 
 schema ()
 
 escapeDatabase ($database)
 
 escapeTable ($table)
 
 escapeField ($field)
 
 escapeAlias ($field)
 
 escapeLike ($string)
 
 inTransaction ()
 
 transactionDepth ()
 
 startTransaction ($name= '')
 
 rollback ($savepoint_name= 'drupal_transaction')
 
 pushTransaction ($name)
 
 popTransaction ($name)
 
 queryRange ($query, $from, $count, array $args=array(), array $options=array())
 
 queryTemporary ($query, array $args=array(), array $options=array())
 
 driver ()
 
 version ()
 
 clientVersion ()
 
 supportsTransactions ()
 
 supportsTransactionalDDL ()
 
 databaseType ()
 
 createDatabase ($database)
 
 mapConditionOperator ($operator)
 
 commit ()
 
 nextId ($existing_id=0)
 
 prepare ($statement, array $driver_options=array())
 
 quote ($string, $parameter_type=\PDO::PARAM_STR)
 
 __sleep ()
 

Static Public Member Functions

static open (array &$connection_options=array())
 
- Static Public Member Functions inherited from Connection
static open (array &$connection_options=array())
 

Data Fields

const DATABASE_NOT_FOUND = 1049
 
const UNSUPPORTED_CHARSET = 2019
 
const UNKNOWN_CHARSET = 1115
 
const SQLSTATE_SYNTAX_ERROR = 42000
 
const MIN_MAX_ALLOWED_PACKET = 1024
 

Protected Member Functions

 popCommittableTransactions ()
 
- Protected Member Functions inherited from Connection
 defaultOptions ()
 
 setPrefix ($prefix)
 
 filterComment ($comment= '')
 
 handleQueryException (\PDOException $e, $query, array $args=array(), $options=array())
 
 expandArguments (&$query, &$args)
 
 popCommittableTransactions ()
 
 generateTemporaryTableName ()
 

Protected Attributes

 $needsCleanup = FALSE
 
- Protected Attributes inherited from Connection
 $target = NULL
 
 $key = NULL
 
 $logger = NULL
 
 $transactionLayers = array()
 
 $driverClasses = array()
 
 $statementClass = 'Drupal\Core\Database\Statement'
 
 $transactionSupport = TRUE
 
 $transactionalDDLSupport = FALSE
 
 $temporaryNameIndex = 0
 
 $connection
 
 $connectionOptions = array()
 
 $schema = NULL
 
 $prefixes = array()
 
 $prefixSearch = array()
 
 $prefixReplace = array()
 
 $unprefixedTablesMap = []
 

Detailed Description

MySQL implementation of .

Constructor & Destructor Documentation

__construct ( \PDO  $connection,
array  $connection_options = array() 
)

Constructs a Connection object.

__destruct ( )

{}

Member Function Documentation

createDatabase (   $database)

Overrides ::createDatabase().

Parameters
string$databaseThe name of the database to create.
Exceptions
\Drupal\Core\Database\DatabaseNotFoundException

References Database\getConnection().

Here is the call graph for this function:

static open ( array &  $connection_options = array())
static

{}

popCommittableTransactions ( )
protected

Overridden to work around issues to MySQL not supporting transactional DDL.

References Connection\query().

Here is the call graph for this function:

query (   $query,
array  $args = array(),
  $options = array() 
)

{}

References Unicode\truncateBytes().

Referenced by Connection\popCommittableTransactions().

Here is the call graph for this function:

Here is the caller graph for this function:

serialize ( )

{}

Field Documentation

const DATABASE_NOT_FOUND = 1049

Error code for "Unknown database" error.

Referenced by Tasks\connect().

const SQLSTATE_SYNTAX_ERROR = 42000

SQLSTATE error code for "Syntax error or access rule violation".

Referenced by Tasks\connect().

const UNKNOWN_CHARSET = 1115

Driver-specific error code for "Unknown character set" error.

Referenced by Tasks\connect().

const UNSUPPORTED_CHARSET = 2019

Error code for "Can't initialize character set" error.

Referenced by Tasks\connect().


The documentation for this class was generated from the following file: