package Default
inherited_from \Zend\Db\Adapter\Driver\AbstractConnection

 Methods

Constructor

__construct(array|\PDO|null $connectionParameters = null

Parameters

$connectionParameters

array\PDOnull

Exceptions

\Zend\Db\Adapter\Exception\InvalidArgumentException

{@inheritDoc}

beginTransaction() 

{@inheritDoc}

commit() 

{@inheritDoc}

connect() 

Exceptions

\Zend\Db\Adapter\Exception\InvalidConnectionParametersException
\Zend\Db\Adapter\Exception\RuntimeException

Disconnect

disconnect() 
Inherited
inherited_from \Zend\Db\Adapter\Driver\ConnectionInterface::disconnect()

{@inheritDoc}

execute($sql) 

Parameters

$sql

Exceptions

\Zend\Db\Adapter\Exception\InvalidQueryException

Get connection parameters

getConnectionParameters() : array
Inherited

Returns

array

{@inheritDoc}

getCurrentSchema() 

Get driver name

getDriverName() : null | string
Inherited

Returns

nullstring

Get the dsn string for this connection

getDsn() : string

Exceptions

\Zend\Db\Adapter\Exception\RunTimeException

Returns

string

{@inheritDoc}

getLastGeneratedValue(string $name = null) : string | null | false

Parameters

$name

string

Returns

stringnullfalse

getProfiler()

getProfiler() : null | \Zend\Db\Adapter\Profiler\ProfilerInterface
Inherited

Returns

null\Zend\Db\Adapter\Profiler\ProfilerInterface

Get resource

getResource() : resource
Inherited
inherited_from \Zend\Db\Adapter\Driver\ConnectionInterface::getResource()

Returns

resource

Checks whether the connection is in transaction state.

inTransaction() : boolean
Inherited

Returns

boolean

{@inheritDoc}

isConnected() 

Prepare

prepare(string $sql) : \Zend\Db\Adapter\Driver\Pdo\Statement

Parameters

$sql

string

Returns

\Zend\Db\Adapter\Driver\Pdo\Statement

{@inheritDoc}

rollback() 

Exceptions

\Zend\Db\Adapter\Exception\RuntimeException

setConnectionParameters()

setConnectionParameters(array $connectionParameters) 
inherited_from \Zend\Db\Adapter\Driver\AbstractConnection::setConnectionParameters()

Parameters

$connectionParameters

setConnectionParameters()

setConnectionParameters(array $connectionParameters) : \Zend\Db\Adapter\Driver\Pdo\Connection
Inherited
fluent This method is part of a fluent interface and will return the same instance

Parameters

$connectionParameters

array

Returns

\Zend\Db\Adapter\Driver\Pdo\Connection

Set driver

setDriver(\Zend\Db\Adapter\Driver\Pdo\Pdo $driver) : \Zend\Db\Adapter\Driver\Pdo\Connection
fluent This method is part of a fluent interface and will return the same instance

Parameters

$driver

\Zend\Db\Adapter\Driver\Pdo\Pdo

Returns

\Zend\Db\Adapter\Driver\Pdo\Connection

setProfiler()

setProfiler(\Zend\Db\Adapter\Profiler\ProfilerInterface $profiler) : \Zend\Db\Adapter\Driver\Pdo\Connection
Inherited
inherited_from \Zend\Db\Adapter\Profiler\ProfilerAwareInterface::setProfiler()
fluent This method is part of a fluent interface and will return the same instance

Parameters

$profiler

Returns

\Zend\Db\Adapter\Driver\Pdo\Connection

Set resource

setResource(\PDO $resource) : \Zend\Db\Adapter\Driver\Pdo\Connection
fluent This method is part of a fluent interface and will return the same instance

Parameters

$resource

\PDO

Returns

\Zend\Db\Adapter\Driver\Pdo\Connection

 Properties

 

$connectionParameters

$connectionParameters : array

Default

array()
 

$driver

$driver : \Zend\Db\Adapter\Driver\Pdo\Pdo

Default

null
 

$driverName

$driverName : string | null

Default

 

$dsn

$dsn : string

Default

null
 

$inTransaction

$inTransaction : boolean

Default

false
 

Nested transactions count.

$nestedTransactionsCount : integer

Default

0
 

$profiler

$profiler : \Zend\Db\Adapter\Profiler\ProfilerInterface | null

Default

 

$resource

$resource : \PDO

Default

null
inherited_from \Zend\Db\Adapter\Driver\AbstractConnection::resource
 

$resource

$resource : resource | null

Default