Methods

Constructor

__construct(array | \PDO | null $connectionParameters) 

Parameters

$connectionParameters

array\PDOnull

Exceptions

\Zend\Db\Adapter\Exception\InvalidArgumentException

Begin transaction

beginTransaction() : \Zend\Db\Adapter\Driver\Pdo\Connection

Get connection parameters

getConnectionParameters() : array

Returns

array

Get current schema

getCurrentSchema() : string

Returns

string

Get driver name

getDriverName() : null | string

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

Get resource

getResource() : \PDO

Returns

In transaction

inTransaction() : bool

Returns

bool

Is connected

isConnected() : bool

Returns

bool

Prepare

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

Parameters

$sql

string

Returns

Set connection parameters

setConnectionParameters(array $connectionParameters) : void

Parameters

$connectionParameters

array

Set driver

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

setProfiler()

setProfiler(\Zend\Db\Adapter\Profiler\ProfilerInterface $profiler) : \Zend\Db\Adapter\Driver\Pdo\Connection

Set resource

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

Parameters

$resource

\PDO

Returns

 Properties

 

$connectionParameters

$connectionParameters : array

 

$driver

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

 

$driverName

$driverName : string

 

$dsn

$dsn : string

 

$inTransaction

$inTransaction : bool

   

$resource

$resource : \PDO