FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\Lib\Db\Driver\Postgres Class Reference
Inheritance diagram for Fossology\Lib\Db\Driver\Postgres:
Inheritance graph
Collaboration diagram for Fossology\Lib\Db\Driver\Postgres:
Collaboration graph

Public Member Functions

 __construct ($dbConnection)
 
 prepare ($statementName, $sqlStatement)
 
 execute ($statementName, $parameters)
 
 query ($sqlStatement)
 
 isConnected ()
 
 getLastError ()
 
 freeResult ($res)
 
 fetchArray ($res)
 
 fetchAll ($res)
 
 begin ()
 
 commit ()
 
 rollback ()
 
 booleanFromDb ($booleanValue)
 
 booleanToDb ($booleanValue)
 
 escapeString ($string)
 
 existsTable ($tableName)
 
 existsColumn ($tableName, $columnName)
 
 insertPreparedAndReturn ($stmt, $sql, $params, $colName)
 

Private Member Functions

 identifierHash ($stmt)
 PostgreSQL uses no more than NAMEDATALEN-1 characters of an identifier; hence long statementNames needs to be hashed to be shorter and do not collide due to equivalence of truncated strings. More...
 

Private Attributes

 $dbConnection
 

Detailed Description

Definition at line 13 of file Postgres.php.

Member Function Documentation

◆ begin()

Fossology\Lib\Db\Driver\Postgres::begin ( )
Returns
void

Implements Fossology\Lib\Db\Driver.

Definition at line 120 of file Postgres.php.

◆ booleanFromDb()

Fossology\Lib\Db\Driver\Postgres::booleanFromDb (   $booleanValue)
Parameters
$booleanValue
Returns
boolean

Implements Fossology\Lib\Db\Driver.

Definition at line 148 of file Postgres.php.

◆ booleanToDb()

Fossology\Lib\Db\Driver\Postgres::booleanToDb (   $booleanValue)
Parameters
boolean$booleanValue
Returns
mixed

Implements Fossology\Lib\Db\Driver.

Definition at line 157 of file Postgres.php.

◆ commit()

Fossology\Lib\Db\Driver\Postgres::commit ( )
Returns
void

Implements Fossology\Lib\Db\Driver.

Definition at line 129 of file Postgres.php.

◆ escapeString()

Fossology\Lib\Db\Driver\Postgres::escapeString (   $string)
Parameters
string
Returns
string

Implements Fossology\Lib\Db\Driver.

Definition at line 166 of file Postgres.php.

◆ execute()

Fossology\Lib\Db\Driver\Postgres::execute (   $statementName,
  $parameters 
)
Parameters
string$statementName
array$parameters
Returns
resource

Implements Fossology\Lib\Db\Driver.

Definition at line 57 of file Postgres.php.

◆ existsColumn()

Fossology\Lib\Db\Driver\Postgres::existsColumn (   $tableName,
  $columnName 
)
Parameters
$tableName
$columnName
Exceptions

Implements Fossology\Lib\Db\Driver.

Definition at line 200 of file Postgres.php.

◆ existsTable()

Fossology\Lib\Db\Driver\Postgres::existsTable (   $tableName)
Parameters
string$tableName
Exceptions

Implements Fossology\Lib\Db\Driver.

Definition at line 176 of file Postgres.php.

◆ fetchAll()

Fossology\Lib\Db\Driver\Postgres::fetchAll (   $res)
Parameters
ressource
Returns
array

Implements Fossology\Lib\Db\Driver.

Definition at line 109 of file Postgres.php.

◆ fetchArray()

Fossology\Lib\Db\Driver\Postgres::fetchArray (   $res)
Parameters
ressource
Returns
array

Implements Fossology\Lib\Db\Driver.

Definition at line 100 of file Postgres.php.

◆ freeResult()

Fossology\Lib\Db\Driver\Postgres::freeResult (   $res)
Parameters
ressource
Returns
bool

Implements Fossology\Lib\Db\Driver.

Definition at line 91 of file Postgres.php.

◆ getLastError()

Fossology\Lib\Db\Driver\Postgres::getLastError ( )
Returns
string

Implements Fossology\Lib\Db\Driver.

Definition at line 82 of file Postgres.php.

◆ identifierHash()

Fossology\Lib\Db\Driver\Postgres::identifierHash (   $stmt)
private

PostgreSQL uses no more than NAMEDATALEN-1 characters of an identifier; hence long statementNames needs to be hashed to be shorter and do not collide due to equivalence of truncated strings.

Parameters
string$stmt
Returns
string

Definition at line 29 of file Postgres.php.

◆ insertPreparedAndReturn()

Fossology\Lib\Db\Driver\Postgres::insertPreparedAndReturn (   $stmt,
  $sql,
  $params,
  $colName 
)
Parameters
string$stmt
string$sql
array$params
string$colName
Returns
mixed

Implements Fossology\Lib\Db\Driver.

Definition at line 226 of file Postgres.php.

◆ isConnected()

Fossology\Lib\Db\Driver\Postgres::isConnected ( )
Returns
bool

Implements Fossology\Lib\Db\Driver.

Definition at line 74 of file Postgres.php.

◆ prepare()

Fossology\Lib\Db\Driver\Postgres::prepare (   $statementName,
  $sqlStatement 
)
Parameters
string$statementName
string$sqlStatement
Returns
resource

Implements Fossology\Lib\Db\Driver.

Definition at line 47 of file Postgres.php.

◆ query()

Fossology\Lib\Db\Driver\Postgres::query (   $sqlStatement)
Parameters
string$sqlStatement
Returns
resource

Implements Fossology\Lib\Db\Driver.

Definition at line 66 of file Postgres.php.

◆ rollback()

Fossology\Lib\Db\Driver\Postgres::rollback ( )
Returns
void

Implements Fossology\Lib\Db\Driver.

Definition at line 138 of file Postgres.php.


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