class MySqlDriver implements ISupplementalDriver

Supplemental MySQL database driver.

Constants

ERROR_ACCESS_DENIED

ERROR_DUPLICATE_ENTRY

ERROR_DATA_TRUNCATED

Methods

__construct(Connection $connection, array $options)

Driver options:

convertException(PDOException $e)

Converts PDOException to DriverException or its descendant.

string
delimite($name)

Delimites identifier for use in a SQL statement.

string
formatBool($value)

Formats boolean for use in a SQL statement.

string
formatDateTime($value)

Formats date-time for use in a SQL statement.

formatDateInterval(DateInterval $value)

No description

string
formatLike($value, $pos)

Encodes string for use in a LIKE statement.

void
applyLimit($sql, $limit, $offset)

Injects LIMIT/OFFSET to the SQL query.

array
normalizeRow($row)

Normalizes result row.

array
getTables()

Returns list of tables.

array
getColumns($table)

Returns metadata for all columns in a table.

array
getIndexes($table)

Returns metadata for all indexes in a table.

array
getForeignKeys($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.

bool
isSupported($item)

Cheks if driver supports specific property

Details

at line 35
__construct(Connection $connection, array $options)

Driver options:

Parameters

Connection $connection
array $options

at line 50
DriverException convertException(PDOException $e)

Converts PDOException to DriverException or its descendant.

Parameters

PDOException $e

Return Value

DriverException

at line 74
string delimite($name)

Delimites identifier for use in a SQL statement.

Parameters

$name

Return Value

string

at line 81
string formatBool($value)

Formats boolean for use in a SQL statement.

Parameters

$value

Return Value

string

at line 87
string formatDateTime($value)

Formats date-time for use in a SQL statement.

Parameters

$value

Return Value

string

at line 93
formatDateInterval(DateInterval $value)

No description

Parameters

DateInterval $value

at line 99
string formatLike($value, $pos)

Encodes string for use in a LIKE statement.

Parameters

$value
$pos

Return Value

string

at line 107
void applyLimit($sql, $limit, $offset)

Injects LIMIT/OFFSET to the SQL query.

Parameters

$sql
$limit
$offset

Return Value

void

at line 120
array normalizeRow($row)

Normalizes result row.

Parameters

$row

Return Value

array

at line 129
array getTables()

Returns list of tables.

Return Value

array

of tuples [(string) name, (bool) view, [(string) fullName]]

at line 142
array getColumns($table)

Returns metadata for all columns in a table.

Parameters

$table

Return Value

array

of tuples [(string) name, (string) table, (string) nativetype, (int) size, (bool) nullable, (mixed) default, (bool) autoincrement, (bool) primary, (array) vendor]]

at line 165
array getIndexes($table)

Returns metadata for all indexes in a table.

Parameters

$table

Return Value

array

of tuples [(string) name, (string[]) columns, (bool) unique, (bool) primary]

at line 179
array getForeignKeys($table)

Returns metadata for all foreign keys in a table.

Parameters

$table

Return Value

array

of tuples [(string) name, (string) local, (string) table, (string) foreign]

at line 197
array getColumnTypes(PDOStatement $statement)

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

Parameters

PDOStatement $statement

Return Value

array

at line 214
bool isSupported($item)

Cheks if driver supports specific property

Parameters

$item

Return Value

bool

Traits

SmartObject