Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
DbBackend Class Reference

Public Member Functions

 __construct ($pluginName)
 
 connect ($dsn)
 
 getDbName ()
 
 getDbType ()
 
 getDbVersion ()
 
 disconnect ()
 
 execute ($sql)
 
 getQueryExecutionTime ()
 
 getTableNames ()
 
 getColumnNames ($table)
 
 matchesMacro ($s)
 

Detailed Description

Constructor & Destructor Documentation

__construct (   $pluginName)

Constructor

Parameters
string$pluginNamename of the db backend plugin to use

Definition at line 1942 of file matrixsqlclient.php.

Member Function Documentation

connect (   $dsn)

Calls plugin to disconnect and reconnect to specified backend.

Parameters
string$dsnplugin's backend to connect to
Returns
bool whether the connection was successful

Definition at line 1966 of file matrixsqlclient.php.

disconnect ( )

Calls plugin to disconnect from backend.

Returns
bool if the disconnect was a success

Definition at line 2007 of file matrixsqlclient.php.

execute (   $sql)

Calls plugin to execute specified query.

Parameters
string$sqlthe SQL to run
Returns
mixed data array of results, or false if the query was invalid

Definition at line 2019 of file matrixsqlclient.php.

getColumnNames (   $table)

Call plugin to get a list of the columns on the specified table.

Parameters
string$tableName of the table.
Returns
array List of table names.

Definition at line 2057 of file matrixsqlclient.php.

getDbName ( )

Calls plugin to return a friendly name/identifier for the connected backend.

Returns
string friendly name/identifier for the currently connected backend

Definition at line 1977 of file matrixsqlclient.php.

getDbType ( )

Calls plugin to return the database type.

Returns
string friendly name/identifier for the database backend

Definition at line 1987 of file matrixsqlclient.php.

getDbVersion ( )

Calls plugin to return a version identifier for the database backend

Returns
string friendly version identifier for the database backend

Definition at line 1997 of file matrixsqlclient.php.

getQueryExecutionTime ( )

Returns the execution time of the last query.

Returns
float the time the query took to execute, in ms, to 3 decimal places

Definition at line 2035 of file matrixsqlclient.php.

getTableNames ( )

Call plugin to get a list of the available tables on the current database.

Returns
array List of table names.

Definition at line 2045 of file matrixsqlclient.php.

matchesMacro (   $s)

Checks to see if the current line matches an internal command/macro.

Parameters
string$sCommand
Returns
boolean true if yes or false if not

Definition at line 2069 of file matrixsqlclient.php.


The documentation for this class was generated from the following file: