Methods

Constructor

__construct(array | \PDO | null $connectionParameters) 

Parameters

$connectionParameters

array\PDOnull

Exceptions

\Zend\Db\Adapter\Exception\InvalidArgumentException

Disconnect

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

inherited_from \Zend\Db\Adapter\Driver\AbstractConnection::disconnect()

Returns

Get connection parameters

getConnectionParameters() : array
Inherited

inherited_from \Zend\Db\Adapter\Driver\AbstractConnection::getConnectionParameters()

Returns

array

Get current schema

getCurrentSchema() : string

Returns

string

Get driver name

getDriverName() : null | string
Inherited

inherited_from \Zend\Db\Adapter\Driver\AbstractConnection::getDriverName()

Returns

nullstring

Get the dsn string for this connection

getDsn() : string

Exceptions

\Zend\Db\Adapter\Exception\RunTimeException

Returns

string

Get last generated id

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

Parameters

$name

string

Returns

stringnullfalse

getProfiler()

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

inherited_from \Zend\Db\Adapter\Driver\AbstractConnection::getProfiler()

Returns

Get resource

getResource() : resource
Inherited

inherited_from \Zend\Db\Adapter\Driver\AbstractConnection::getResource()

Returns

resource

Checks whether the connection is in transaction state.

inTransaction() : boolean
Inherited

inherited_from \Zend\Db\Adapter\Driver\AbstractConnection::inTransaction()

Returns

boolean

Is connected

isConnected() : bool

Returns

bool

Prepare

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

Parameters

$sql

string

Returns

setConnectionParameters()

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

Parameters

$connectionParameters

array

Returns

\Zend\Db\Adapter\Driver\self

Set driver

setDriver(\Zend\Db\Adapter\Driver\Pdo\Pdo $driver) : \Zend\Db\Adapter\Driver\Pdo\self

Parameters

Returns

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

setProfiler()

setProfiler(\Zend\Db\Adapter\Profiler\ProfilerInterface $profiler) : \Zend\Db\Adapter\Driver\self
Inherited

inherited_from \Zend\Db\Adapter\Driver\AbstractConnection::setProfiler()

Parameters

Returns

\Zend\Db\Adapter\Driver\self

Set resource

setResource(\PDO $resource) : \Zend\Db\Adapter\Driver\Pdo\self

Parameters

$resource

\PDO

Returns

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

 Properties

 

$connectionParameters

$connectionParameters : array
Inherited

inherited_from \Zend\Db\Adapter\Driver\AbstractConnection::$$connectionParameters
 

$driver

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

 

$driverName

$driverName : string | null
Inherited

inherited_from \Zend\Db\Adapter\Driver\AbstractConnection::$$driverName
 

$dsn

$dsn : string

 

$inTransaction

$inTransaction : boolean
Inherited

inherited_from \Zend\Db\Adapter\Driver\AbstractConnection::$$inTransaction
 

Nested transactions count.

$nestedTransactionsCount : integer
Inherited

inherited_from \Zend\Db\Adapter\Driver\AbstractConnection::$$nestedTransactionsCount
 

$profiler

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

inherited_from \Zend\Db\Adapter\Driver\AbstractConnection::$$profiler
 

$resource

$resource : \PDO