interface Driver

Provides database-specific functionality.

Constants

SupportSequence

SupportSelectUngroupedColumns

SupportMultiInsertAsSelect

SupportMultiColumnAsOrCondition

SupportSchema

deprecated SUPPORT_SEQUENCE

deprecated SUPPORT_SELECT_UNGROUPED_COLUMNS

deprecated SUPPORT_MULTI_INSERT_AS_SELECT

deprecated SUPPORT_MULTI_COLUMN_AS_OR_COND

deprecated SUPPORT_SUBSELECT

deprecated SUPPORT_SCHEMA

deprecated SupportSubselect

Methods

bool
isSupported(string $feature)

Checks if the engine supports a specific feature.

void
initialize(Connection $connection, array $options)

Initializes connection.

convertException(PDOException $e)

Converts PDOException to DriverException or its descendant.

string
delimite(string $name)

Adds delimiters around database identifier.

string
formatDateTime(DateTimeInterface $value)

Formats a date-time value for use in an SQL statement.

string
formatDateInterval(DateInterval $value)

Formats a date-time interval for use in an SQL statement.

string
formatLike(string $value, int $pos)

Encodes string for use in a LIKE statement.

void
applyLimit(string $sql, int|null $limit, int|null $offset)

Applies LIMIT and OFFSET clauses to an SQL query.

array
getTables()

Returns a list of all tables in the database.

array
getColumns(string $table)

Returns metadata for all columns in a table.

array
getIndexes(string $table)

Returns metadata for all indexes in a table.

array
getForeignKeys(string $table)

Returns metadata for all foreign keys in a table.

array
getColumnTypes(PDOStatement $statement)

Returns associative array of detected types (IStructure::FIELD_*) in result set.

Details

at line 39
bool isSupported(string $feature)

Checks if the engine supports a specific feature.

Parameters

string $feature

Return Value

bool

at line 44
void initialize(Connection $connection, array $options)

Initializes connection.

Parameters

Connection $connection
array $options

Return Value

void

at line 49
DriverException convertException(PDOException $e)

Converts PDOException to DriverException or its descendant.

Parameters

PDOException $e

Return Value

DriverException

at line 54
string delimite(string $name)

Adds delimiters around database identifier.

Parameters

string $name

Return Value

string

at line 57
string formatDateTime(DateTimeInterface $value)

Formats a date-time value for use in an SQL statement.

Parameters

DateTimeInterface $value

Return Value

string

at line 60
string formatDateInterval(DateInterval $value)

Formats a date-time interval for use in an SQL statement.

Parameters

DateInterval $value

Return Value

string

at line 63
string formatLike(string $value, int $pos)

Encodes string for use in a LIKE statement.

Parameters

string $value
int $pos

Return Value

string

at line 66
void applyLimit(string $sql, int|null $limit, int|null $offset)

Applies LIMIT and OFFSET clauses to an SQL query.

Parameters

string $sql
int|null $limit
int|null $offset

Return Value

void

at line 74
array getTables()

Returns a list of all tables in the database.

Return Value

array

at line 80
array getColumns(string $table)

Returns metadata for all columns in a table.

Parameters

string $table

Return Value

array

at line 86
array getIndexes(string $table)

Returns metadata for all indexes in a table.

Parameters

string $table

Return Value

array

at line 92
array getForeignKeys(string $table)

Returns metadata for all foreign keys in a table.

Parameters

string $table

Return Value

array

at line 98
array getColumnTypes(PDOStatement $statement)

Returns associative array of detected types (IStructure::FIELD_*) in result set.

Parameters

PDOStatement $statement

Return Value

array