Class myMVC_DatabaseConnectorPgsql

Description

Database connector for PostgreSQL (http://www.postgresql.org/)

Located in /myMVC/DatabaseConnectorPgsql.php (line 26)

myMVC_TypeCheck
   |
   --myMVC_DatabaseConnector
      |
      --myMVC_DatabaseConnectorPgsql
Variable Summary
 static mixed $connection
Method Summary
 int errno ()
 string error ()
 boolean execute (string $query)
 resource executeSelect (string $query)
 boolean freeResult (resource $result)
 resource getDatabaseConnection ()
 int getRowsNum (resource $result)
 array getValueArrayFromResult (resource $result)
 array getValuesFromResult (resource $result)
 string quoteSqlStringForLike (string $value, [string $prefix = '%'], [string $suffix = '%'])
Variables
Methods
errno (line 35)

Wrapper for the errno-function of the selected database engine

  • return: the error number
  • access: protected
int errno ()

Redefinition of:
myMVC_DatabaseConnector::errno()
Wrapper for the errno-function of the selected database engine
error (line 45)

Wrapper for the error-function of the selected database engine

  • return: the error string
  • access: protected
string error ()

Redefinition of:
myMVC_DatabaseConnector::error()
Wrapper for the error-function of the selected database engine
execute (line 120)

Execute an INSERT, UPDATE or DELETE query

  • return: true on success, false on failure, last inserted ID on successfully INSERT
  • access: protected
boolean execute (string $query)
  • string $query: The SQL-Query

Redefinition of:
myMVC_DatabaseConnector::execute()
Execute an INSERT, UPDATE or DELETE query
executeSelect (line 150)

Executes a SELECT-Query

  • return: a resource to get data on success, false otherwise
  • access: protected
resource executeSelect (string $query)
  • string $query: The SQL-Query

Redefinition of:
myMVC_DatabaseConnector::executeSelect()
Executes a SELECT-Query
freeResult (line 217)

Free the allocated memory for the SQL query.

  • return: true on success, false on problem
  • access: protected
boolean freeResult (resource $result)
  • resource $result: The resource

Redefinition of:
myMVC_DatabaseConnector::freeResult()
Free the allocated memory for the SQL query.
getDatabaseConnection (line 57)

Connects to the database.

This will just be done, if no connection exists yet.

  • return: a connection resource
  • throws: myMVC_DatabaseException if no connection is possible
  • access: protected
resource getDatabaseConnection ()

Redefinition of:
myMVC_DatabaseConnector::getDatabaseConnection()
Connects to the database.
getRowsNum (line 206)

Returns the number of row of the runned query.

  • return: The row's number
  • access: protected
int getRowsNum (resource $result)
  • resource $result: The resource

Redefinition of:
myMVC_DatabaseConnector::getRowsNum()
Returns the number of row of the runned query.
getValueArrayFromResult (line 178)

Returns a record as associative array, or NULL if no record can be returned.

  • return: The record
  • access: protected
array getValueArrayFromResult (resource $result)
  • resource $result: The resource

Redefinition of:
myMVC_DatabaseConnector::getValueArrayFromResult()
Returns a record as associative array, or NULL if no record can be returned.
getValuesFromResult (line 192)

Returns a record as numeric array, or NULL if no record can be returned.

  • return: The record
  • access: protected
array getValuesFromResult (resource $result)
  • resource $result: The resource

Redefinition of:
myMVC_DatabaseConnector::getValuesFromResult()
Returns a record as numeric array, or NULL if no record can be returned.
quoteSqlStringForLike (line 90)

Quotes a string to use in a SQL-Query (with LIKE)

  • return: A secure SQL-String (quoted)
  • access: protected
string quoteSqlStringForLike (string $value, [string $prefix = '%'], [string $suffix = '%'])
  • string $value: The string with the Query
  • string $prefix: (normally %) added BEFORE the string
  • string $suffix: (normally %) added AFTER the string

Redefinition of:
myMVC_DatabaseConnector::quoteSqlStringForLike()
Quotes a string to use in a SQL-Query (with LIKE)

Inherited Methods

Inherited From myMVC_DatabaseConnector

 myMVC_DatabaseConnector::__construct()
 myMVC_DatabaseConnector::errno()
 myMVC_DatabaseConnector::error()
 myMVC_DatabaseConnector::execute()
 myMVC_DatabaseConnector::executeSelect()
 myMVC_DatabaseConnector::freeResult()
 myMVC_DatabaseConnector::getDatabaseConnection()
 myMVC_DatabaseConnector::getRowsNum()
 myMVC_DatabaseConnector::getValueArrayFromResult()
 myMVC_DatabaseConnector::getValuesFromResult()
 myMVC_DatabaseConnector::quoteSqlString()
 myMVC_DatabaseConnector::quoteSqlStringForLike()

Inherited From myMVC_TypeCheck

 myMVC_TypeCheck::checkAutoIncrementalId()
 myMVC_TypeCheck::checkBoolNotNull()
 myMVC_TypeCheck::checkBoolNull()
 myMVC_TypeCheck::checkDateNotNull()
 myMVC_TypeCheck::checkDateNull()
 myMVC_TypeCheck::checkDateTimeNotNull()
 myMVC_TypeCheck::checkDateTimeNull()
 myMVC_TypeCheck::checkDomainnameNotNull()
 myMVC_TypeCheck::checkDomainnameNull()
 myMVC_TypeCheck::checkEMailNotNull()
 myMVC_TypeCheck::checkEMailNull()
 myMVC_TypeCheck::checkIPNotNull()
 myMVC_TypeCheck::checkIPNull()
 myMVC_TypeCheck::checkMacNotNull()
 myMVC_TypeCheck::checkMacNull()
 myMVC_TypeCheck::checkMaskNotNull()
 myMVC_TypeCheck::checkMaskNull()
 myMVC_TypeCheck::checkNetworkNotNull()
 myMVC_TypeCheck::checkNetworkNull()
 myMVC_TypeCheck::checkSignedIntNotNull()
 myMVC_TypeCheck::checkSignedIntNull()
 myMVC_TypeCheck::checkSignedMediumIntNotNull()
 myMVC_TypeCheck::checkSignedMediumIntNull()
 myMVC_TypeCheck::checkSignedSmallIntNotNull()
 myMVC_TypeCheck::checkSignedSmallIntNull()
 myMVC_TypeCheck::checkSignedTinyIntNotNull()
 myMVC_TypeCheck::checkSignedTinyIntNull()
 myMVC_TypeCheck::checkString255NotNull()
 myMVC_TypeCheck::checkString255Null()
 myMVC_TypeCheck::checkTextNotNull()
 myMVC_TypeCheck::checkTextNull()
 myMVC_TypeCheck::checkTimeNotNull()
 myMVC_TypeCheck::checkTimeNull()
 myMVC_TypeCheck::checkUnsignedIntNotNull()
 myMVC_TypeCheck::checkUnsignedIntNull()
 myMVC_TypeCheck::checkUnsignedMediumIntNotNull()
 myMVC_TypeCheck::checkUnsignedMediumIntNull()
 myMVC_TypeCheck::checkUnsignedSmallIntNotNull()
 myMVC_TypeCheck::checkUnsignedSmallIntNull()
 myMVC_TypeCheck::checkUnsignedTinyIntNotNull()
 myMVC_TypeCheck::checkUnsignedTinyIntNull()
 myMVC_TypeCheck::checkURLNotNull()
 myMVC_TypeCheck::checkURLNull()

Documentation generated on Thu, 05 Jan 2017 12:47:14 +0100 by phpDocumentor 1.4.4