abstract class PdoDriver implements Driver

PDO-based driver.

Properties

protected $pdo

Methods

void
connect(string $dsn, string|null $user = null, string|null $password = null, array|null $options = null)

Initializes connection.

PDO|null
getPdo()

No description

query(string $queryString, array $params)

No description

void
beginTransaction()

No description

void
commit()

No description

void
rollBack()

No description

string
getInsertId(string|null $sequence = null)

Returns the ID of the last inserted row or sequence value.

string
quote(string $string, int $type = PDO::PARAM_STR)

Delimits string for use in SQL statement.

convertException(PDOException $src, string|null $class = null)

No description

string|null
detectExceptionClass(PDOException $e)

No description

Details

at line 28
void connect(string $dsn, string|null $user = null, string|null $password = null, array|null $options = null)

Initializes connection.

Parameters

string $dsn
string|null $user
string|null $password
array|null $options

Return Value

void

Exceptions

ConnectionException

at line 39
PDO|null getPdo()

No description

Return Value

PDO|null

at line 45
ResultDriver query(string $queryString, array $params)

No description

Parameters

string $queryString
array $params

Return Value

ResultDriver

at line 69
void beginTransaction()

No description

Return Value

void

at line 79
void commit()

No description

Return Value

void

at line 89
void rollBack()

No description

Return Value

void

at line 99
string getInsertId(string|null $sequence = null)

Returns the ID of the last inserted row or sequence value.

Parameters

string|null $sequence

Return Value

string

at line 110
string quote(string $string, int $type = PDO::PARAM_STR)

Delimits string for use in SQL statement.

Parameters

string $string
int $type

Return Value

string

at line 120
DriverException convertException(PDOException $src, string|null $class = null)

No description

Parameters

PDOException $src
string|null $class

Return Value

DriverException

at line 138
string|null detectExceptionClass(PDOException $e)

No description

Parameters

PDOException $e

Return Value

string|null

Traits

SmartObject