|
| __construct (Logger $logger) |
|
| setDriver (Driver &$dbDriver) |
|
| getDriver () |
|
| begin () |
|
| commit () |
|
| rollback () |
|
| prepare ($statementName, $sqlStatement) |
|
| insertPreparedAndReturn ($statementName, $sqlStatement, $params, $returning) |
|
| execute ($statementName, $params=array()) |
|
| getSingleRow ($sqlStatement, $params=array(), $statementName="") |
|
| getRows ($sqlStatement, $params=array(), $statementName="") |
|
| queryOnce ($sqlStatement, $sqlLog='') |
|
| freeResult ($res) |
|
| fetchArray ($res) |
|
| fetchAll ($res) |
|
| createMap ($tableName, $keyColumn, $valueColumn, $sqlLog='') |
|
| flushStats () |
|
| booleanFromDb ($booleanValue) |
|
| booleanToDb ($booleanValue) |
|
| insertInto ($tableName, $keys, $params, $sqlLog='', $returning='') |
|
| insertTableRow ($tableName, $assocParams, $sqlLog='', $returning='') |
|
| updateTableRow ($tableName, $assocParams, $idColName, $id, $sqlLog='') |
|
| existsTable ($tableName) |
|
| existsColumn ($tableName, $columnName) |
|
|
| $dbDriver |
|
| $preparedStatements |
|
| $logger |
|
| $cumulatedTime = array() |
|
| $queryCount = array() |
|
|
| cleanupParamsArray ($params) |
|
Definition at line 14 of file DbManager.php.
◆ checkResult()
Fossology\Lib\Db\DbManager::checkResult |
( |
|
$result, |
|
|
|
$sqlStatement = "" |
|
) |
| |
|
protected |
Check the result for unexpected errors. If found, treat them as fatal.
- Parameters
-
resource | $result | command result object |
string | $sqlStatement | SQL command (optional) |
Definition at line 116 of file DbManager.php.
◆ collectStatistics()
Fossology\Lib\Db\DbManager::collectStatistics |
( |
|
$statementName, |
|
|
|
$execTime |
|
) |
| |
|
protected |
◆ createMap()
Fossology\Lib\Db\DbManager::createMap |
( |
|
$tableName, |
|
|
|
$keyColumn, |
|
|
|
$valueColumn, |
|
|
|
$sqlLog = '' |
|
) |
| |
- Parameters
-
string | $tableName | |
string | $keyColumn | |
string | $valueColumn | |
string | $sqlLog | |
- Returns
- array
Definition at line 232 of file DbManager.php.
◆ execute()
Fossology\Lib\Db\DbManager::execute |
( |
|
$statementName, |
|
|
|
$params = array() |
|
) |
| |
|
abstract |
◆ existsColumn()
Fossology\Lib\Db\DbManager::existsColumn |
( |
|
$tableName, |
|
|
|
$columnName |
|
) |
| |
◆ existsTable()
Fossology\Lib\Db\DbManager::existsTable |
( |
|
$tableName | ) |
|
◆ fetchAll()
Fossology\Lib\Db\DbManager::fetchAll |
( |
|
$res | ) |
|
◆ fetchArray()
Fossology\Lib\Db\DbManager::fetchArray |
( |
|
$res | ) |
|
◆ formatMilliseconds()
Fossology\Lib\Db\DbManager::formatMilliseconds |
( |
|
$seconds | ) |
|
|
protected |
◆ freeResult()
Fossology\Lib\Db\DbManager::freeResult |
( |
|
$res | ) |
|
◆ getDriver()
Fossology\Lib\Db\DbManager::getDriver |
( |
| ) |
|
◆ getRows()
Fossology\Lib\Db\DbManager::getRows |
( |
|
$sqlStatement, |
|
|
|
$params = array() , |
|
|
|
$statementName = "" |
|
) |
| |
- Parameters
-
| $sqlStatement | |
array | $params | |
string | $statementName | |
- Returns
- array
Definition at line 164 of file DbManager.php.
◆ getSingleRow()
Fossology\Lib\Db\DbManager::getSingleRow |
( |
|
$sqlStatement, |
|
|
|
$params = array() , |
|
|
|
$statementName = "" |
|
) |
| |
- Parameters
-
string | $sqlStatement | |
array | $params | |
string | $statementName | (optional) |
- Returns
- array
Definition at line 142 of file DbManager.php.
◆ insertInto()
Fossology\Lib\Db\DbManager::insertInto |
( |
|
$tableName, |
|
|
|
$keys, |
|
|
|
$params, |
|
|
|
$sqlLog = '' , |
|
|
|
$returning = '' |
|
) |
| |
- Parameters
-
| $tableName | |
| $keys | |
| $params | |
string | $sqlLog | |
string | $returning | |
- Returns
- mixed|void
Definition at line 309 of file DbManager.php.
◆ insertPreparedAndReturn()
Fossology\Lib\Db\DbManager::insertPreparedAndReturn |
( |
|
$statementName, |
|
|
|
$sqlStatement, |
|
|
|
$params, |
|
|
|
$returning |
|
) |
| |
Note: this builds a query which is not useable with SQLite one should use SqLiteE::insertPreparedAndReturn() instead
- Parameters
-
$statementName | |
$sqlStatement | |
$params | |
$returning | |
- Returns
- mixed
Definition at line 92 of file DbManager.php.
◆ insertTableRow()
Fossology\Lib\Db\DbManager::insertTableRow |
( |
|
$tableName, |
|
|
|
$assocParams, |
|
|
|
$sqlLog = '' , |
|
|
|
$returning = '' |
|
) |
| |
- Parameters
-
| $tableName | |
array | $assocParams | array with keys as column names |
string | $sqlLog | |
string | $returning | column that should be returned (empty string if not required) |
- Returns
- mixed|null
Definition at line 336 of file DbManager.php.
◆ prepare()
Fossology\Lib\Db\DbManager::prepare |
( |
|
$statementName, |
|
|
|
$sqlStatement |
|
) |
| |
|
abstract |
◆ queryOnce()
Fossology\Lib\Db\DbManager::queryOnce |
( |
|
$sqlStatement, |
|
|
|
$sqlLog = '' |
|
) |
| |
use only for create, begin, commit and injection free queries
- Parameters
-
string | $sqlStatement | |
string | $sqlLog | sqlStatement |
Definition at line 185 of file DbManager.php.
◆ setDriver()
Fossology\Lib\Db\DbManager::setDriver |
( |
Driver & |
$dbDriver | ) |
|
The documentation for this class was generated from the following file: