QCubed - A PHP5 rapid development MVC framework.
Home  |  Updates

classQDatabaseBase

QDatabaseBase Class Reference

Inherits QBaseClass.

Inherited by QMySqliDatabase, QPostgreSqlDatabase, and QSqlServerDatabase.

Collaboration diagram for QDatabaseBase:

List of all members.

Public Member Functions

Public Attributes

Protected Member Functions

Protected Attributes


Detailed Description

Every database adapter must implement the following 5 classes (all which are abstract): * DatabaseBase * DatabaseFieldBase * DatabaseResultBase * DatabaseRowBase * DatabaseExceptionBase

This Database library also has the following classes already defined, and Database adapters are assumed to use them internally: * DatabaseIndex * DatabaseForeignKey * DatabaseFieldType (which is an abstract class that solely contains constants)


Constructor & Destructor Documentation

QDatabaseBase::__construct ( intDatabaseIndex,
objConfigArray 
)

Constructs a Database Adapter based on the database index and the configuration array of properties for this particular adapter Sets up the base-level configuration properties for this database, namely DB Profiling and Database Index

Parameters:
integer $intDatabaseIndex
string[] $objConfigArray configuration array as passed in to the constructor by QApplicationBase::InitializeDatabaseConnections();
Returns:
void

References $intDatabaseIndex, $objConfigArray, QType::Boolean, and QType::Cast().


Member Function Documentation

QDatabaseBase::__get ( strName  ) 

Override method to perform a property "Get" This will get the value of $strName All inhereted objects that call __get() should always fall through to calling parent::__get() in a try/catch statement catching for CallerExceptions.

Parameters:
string $strName Name of the property to get
Returns:
mixed the returned property

Reimplemented from QBaseClass.

Reimplemented in QMySqlDatabase, QMySqliDatabase, QPostgreSqlDatabase, and QSqlServerDatabase.

References QCallerException::IncrementOffset().

QDatabaseBase::Close (  )  [abstract]

QDatabaseBase::Connect (  )  [abstract]

QDatabaseBase::EnableProfiling (  ) 

Allows for the enabling of DB profiling while in middle of the script

Returns:
void

QDatabaseBase::GetFieldsForTable ( strTableName  )  [abstract]

QDatabaseBase::GetForeignKeysForTable ( strTableName  )  [abstract]

QDatabaseBase::GetIndexesForTable ( strTableName  )  [abstract]

QDatabaseBase::GetTables (  )  [abstract]

QDatabaseBase::InsertId ( strTableName = null,
strColumnName = null 
) [abstract]

QDatabaseBase::LogQuery ( strQuery  )  [protected]

QDatabaseBase::NonQuery ( strNonQuery  )  [abstract]

QDatabaseBase::OutputProfiling (  ) 

Displays the OutputProfiling results, plus a link which will popup the details of the profiling.

Returns:
void

References _p().

QDatabaseBase::PrepareStatement ( strQuery,
mixParameterArray 
)

QDatabaseBase::Query ( strQuery  )  [abstract]

QDatabaseBase::SqlLimitVariablePrefix ( strLimitInfo  )  [abstract]

QDatabaseBase::SqlLimitVariableSuffix ( strLimitInfo  )  [abstract]

QDatabaseBase::SqlSortByVariable ( strSortByInfo  )  [abstract]

QDatabaseBase::SqlVariable ( mixData,
blnIncludeEquality = false,
blnReverseEquality = false 
)

Properly escapes $mixData to be used as a SQL query parameter. If IncludeEquality is set (usually not), then include an equality operator. So for most data, it would just be "=". But, for example, if $mixData is NULL, then most RDBMS's require the use of "IS".

Parameters:
mixed $mixData
boolean $blnIncludeEquality whether or not to include an equality operator
boolean $blnReverseEquality whether the included equality operator should be a "NOT EQUAL", e.g. "!="
Returns:
string the properly formatted SQL variable

Reimplemented in QPostgreSqlDatabase.

References QDateTime::FormatIso.

Referenced by PrepareStatement().

QDatabaseBase::TransactionBegin (  )  [abstract]

QDatabaseBase::TransactionCommit (  )  [abstract]

QDatabaseBase::TransactionRollBack (  )  [abstract]


Member Data Documentation

QDatabaseBase::$blnConnectedFlag = false [protected]

QDatabaseBase::$blnEnableProfiling [protected]

QDatabaseBase::$intDatabaseIndex [protected]

Referenced by __construct().

QDatabaseBase::$objConfigArray [protected]

Referenced by __construct().

QDatabaseBase::$strEscapeIdentifierBegin = '"' [protected]

Reimplemented in QMySqliDatabase, and QSqlServerDatabase.

QDatabaseBase::$strEscapeIdentifierEnd = '"' [protected]

Reimplemented in QMySqliDatabase, and QSqlServerDatabase.

QDatabaseBase::$strProfileArray [protected]


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