PdbDriverInterface
in
Methods for a driver to implement.
Most SQL things are common enough, but occasionally there a DBMS specific syntaxes largely around schema, permissions, and non-standard features.
Table of Contents
Methods
- createLock() : bool
- deleteLock() : bool
- extractEnumArr() : array<string|int, string>
- Returns definition list from column of type ENUM
- fieldList() : array<string|int, PdbColumn>
- getDependentKeys() : array<string|int, PdbForeignKey>
- Gets all of the dependent foreign key columns (i.e. with the CASCADE delete rule) in other tables which link to the id column of a specific table
- getForeignKeys() : array<string|int, PdbForeignKey>
- Gets all of the columns which have foreign key constraints in a table
- getPermissions() : array<string|int, string>
- Get the permissions of the current connection.
- getTableAttributes() : array<string|int, mixed>
- Get adapter specific table information.
- getTableNames() : array<string|int, string>
- Fetches the current list of tables.
- indexList() : array<string|int, PdbIndex>
- tableExists() : bool
Methods
createLock()
public
createLock(string $name[, float $timeout = 0 ]) : bool
Parameters
- $name : string
- $timeout : float = 0
-
in seconds
Return values
booldeleteLock()
public
deleteLock(string $name) : bool
Parameters
- $name : string
Return values
boolextractEnumArr()
Returns definition list from column of type ENUM
public
extractEnumArr(string $table, string $column) : array<string|int, string>
Parameters
- $table : string
-
non-prefixed
- $column : string
Return values
array<string|int, string>fieldList()
public
fieldList(string $table) : array<string|int, PdbColumn>
Parameters
- $table : string
-
non-prefixed
Return values
array<string|int, PdbColumn> —[ name => PdbColumn ]
getDependentKeys()
Gets all of the dependent foreign key columns (i.e. with the CASCADE delete rule) in other tables which link to the id column of a specific table
public
getDependentKeys(string $table) : array<string|int, PdbForeignKey>
Parameters
- $table : string
-
non-prefixed
Return values
array<string|int, PdbForeignKey>getForeignKeys()
Gets all of the columns which have foreign key constraints in a table
public
getForeignKeys(string $table) : array<string|int, PdbForeignKey>
Parameters
- $table : string
-
non-prefixed
Return values
array<string|int, PdbForeignKey>getPermissions()
Get the permissions of the current connection.
public
getPermissions() : array<string|int, string>
Return values
array<string|int, string>getTableAttributes()
Get adapter specific table information.
public
getTableAttributes(string $table) : array<string|int, mixed>
Parameters
- $table : string
-
non-prefixed
Return values
array<string|int, mixed> —[ key => value]
getTableNames()
Fetches the current list of tables.
public
getTableNames([string $filter = '*' ][, bool $strip = true ]) : array<string|int, string>
Parameters
- $filter : string = '*'
-
''- (empty) to return all tables'*'- to return only tables with the default prefix- other - filter on this prefix
- $strip : bool = true
-
remove the prefix from the table names
Return values
array<string|int, string>indexList()
public
indexList(string $table) : array<string|int, PdbIndex>
Parameters
- $table : string
-
non-prefixed
Return values
array<string|int, PdbIndex>tableExists()
public
tableExists(string $table) : bool
Parameters
- $table : string
-
non-prefixed