Class: BitDbAdodb
Source Location: /kernel/BitDbAdodb.php
BitDb
|
--BitDbAdodb
This class is used for database access and provides a number of functions to help with database portability.
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Methods
constructor BitDbAdodb [line 40]
BitDbAdodb BitDbAdodb(
[
$pConnectionHash = NULL])
|
|
Parameters:
method Affected_Rows [line 632]
method CompleteTrans [line 598]
Used together with StartTrans() to end a transaction. Monitors connection for sql errors, and will commit or rollback as appropriate. autoComplete if TRUE, monitor sql errors and commit and rollback as appropriate, and if set to FALSE force rollback even if no SQL error detected.
Tags:
Overrides BitDb::CompleteTrans() (Used together with StartTrans() to end a transaction. Monitors connection for sql errors, and will commit or rollback as appropriate.)
method convertQuery [line 541]
the convertQuery(
pQuery
&$pQuery)
|
|
Converts backtick (`) quotes to the appropriate quote for the database.
Tags:
Overrides BitDb::convertQuery() (Converts backtick (`) quotes to the appropriate quote for the database.)
Parameters:
method CreateSequence [line 464]
0 CreateSequence(
[pSequenceName
$pSeqname = 'adodbseq'], [pStartID
$startID = 1])
|
|
A database portable Sequence management function.
Tags:
Overrides BitDb::CreateSequence() (A database portable Sequence management function.)
Parameters:
method createTables [line 97]
TRUE|FALSE createTables(
pTables
$pTables, [pOptions
$pOptions = array()])
|
|
Used to create tables - most commonly from package/schema_inc.php files
Tags:
Overrides BitDb::createTables() (Used to create tables - most commonly from package/schema_inc.php files)
Parameters:
method debug [line 562]
void debug(
[pLevel
$pLevel = 99])
|
|
will activate ADODB's native debugging output
Overrides BitDb::debug() (will activate ADODB like native debugging output)
Parameters:
method DropSequence [line 478]
FALSE DropSequence(
[pSequenceName
$pSeqname = 'adodbseq'])
|
|
A database portable Sequence management function.
Tags:
Parameters:
method dropTables [line 144]
TRUE dropTables(
pTables
$pTables)
|
|
Used to drop tables
Tags:
Overrides BitDb::dropTables() (Used to drop tables)
Parameters:
method GenID [line 443]
0 GenID(
pSequenceName
$pSequenceName, [
$pUseDbPrefix = TRUE])
|
|
A database portable Sequence management function.
Tags:
Overrides BitDb::GenID() (A database portable Sequence management function.)
Parameters:
method getAll [line 304]
TRUE getAll(
string
$pQuery, [array
$pValues = FALSE], [numeric
$pCacheTime = BIT_QUERY_DEFAULT])
|
|
getAll
Tags:
Parameters:
method getArray [line 355]
the getArray(
pQuery
$pQuery, [pValues
$pValues = FALSE], [pForceArray
$pForceArray = FALSE], [pFirst2Cols
$pFirst2Cols = FALSE], [
$pCacheTime = BIT_QUERY_DEFAULT])
|
|
Returns an associative array for the given query. See AdoDB GetAssoc() function for more detail.
Tags:
Overrides BitDb::getArray() (Returns an associative array for the given query.)
Parameters:
method getAssoc [line 379]
the getAssoc(
pQuery
$pQuery, [pValues
$pValues = FALSE], [pForceArray
$pForceArray = FALSE], [pFirst2Cols
$pFirst2Cols = FALSE], [
$pCacheTime = BIT_QUERY_DEFAULT])
|
|
Returns an associative array for the given query. See AdoDB GetAssoc() function for more detail.
Tags:
Overrides BitDb::getAssoc() (Returns an associative array for the given query.)
Parameters:
method getCol [line 330]
the getCol(
pQuery
$pQuery, [pValues
$pValues = FALSE], [pForceArray
$pTrim = FALSE], [pFirst2Cols
$pCacheTime = BIT_QUERY_DEFAULT])
|
|
Executes the SQL and returns all elements of the first column as a 1-dimensional array. The recordset is discarded for you automatically. If an error occurs, FALSE is returned. See AdoDB GetCol() function for more detail.
Tags:
Overrides BitDb::getCol() (Executes the SQL and returns all elements of the first column as a 1-dimensional array. The recordset is discarded for you automatically. If an error occurs, false is returned.)
Parameters:
method getDebugLevel [line 572]
returns the level of query debugging output
Tags:
Overrides BitDb::getDebugLevel() (returns the level of query debugging output)
method getOne [line 424]
the getOne(
pQuery
$pQuery, [pValues
$pValues = NULL], [pReportErrors
$pNumRows = NULL], [pOffset
$pOffset = NULL], [
$pCacheTime = BIT_QUERY_DEFAULT])
|
|
Returns a single column value from the database.
Tags:
Overrides BitDb::getOne() (Returns a single column value from the database.)
Parameters:
method getRow [line 401]
returns getRow(
pQuery
$pQuery, [pValues
$pValues = FALSE], [
$pCacheTime = BIT_QUERY_DEFAULT])
|
|
Executes the SQL and returns the first row as an array. The recordset and remaining rows are discarded for you automatically. If an error occurs, FALSE is returned. See AdoDB GetRow() function for more detail.
Tags:
Overrides BitDb::getRow() (Executes the SQL and returns the first row as an array. The recordset and remaining rows are discarded for you automatically. If an error occurs, false is returned.)
Parameters:
method ifNull [line 494]
a ifNull(
pField
$pField, pNullRepl
$pNullRepl)
|
|
A database portable IFNULL function.
Tags:
Overrides BitDb::ifNull() (A database portable IFNULL function.)
Parameters:
method ls [line 504]
Format the timestamp in the format the database accepts.
Tags:
Overrides BitDb::ls() (Format the timestamp in the format the database accepts.)
Parameters:
method MetaColumns [line 275]
array MetaColumns(
table
$table, [upper
$normalize = TRUE], [schema
$schema = FALSE])
|
|
List columns in a database as an array of ADOFieldObjects. See top of file for definition of object.
Tags:
Overrides BitDb::MetaColumns() (List columns in a database as an array of ADOFieldObjects.)
Parameters:
method MetaIndexes [line 290]
array MetaIndexes(
table
$table, [primary
$primary = FALSE], [owner
$owner = FALSE])
|
|
List indexes in a database as an array of ADOFieldObjects. See top of file for definition of object.
Tags:
Overrides BitDb::MetaIndexes() (List indexes in a database as an array of ADOFieldObjects.)
Parameters:
method MetaTables [line 625]
array MetaTables(
[ttype
$ttype = FALSE], [showSchema
$showSchema = FALSE], [mask
$mask = FALSE])
|
|
Create a list of tables available in the current database
Tags:
Overrides BitDb::MetaTables() (Create a list of tables available in the current database)
Parameters:
method OffsetDate [line 530]
New OffsetDate(
pDays
$pDays, [pColumn
$pColumn = NULL])
|
|
Calculate the offset of a date for a particular database and generate appropriate SQL. Useful for calculating future/past dates and storing in a database.
Tags:
Overrides BitDb::OffsetDate() (Calculate the offset of a date for a particular database and generate appropriate SQL. Useful for calculating future/past dates and storing in a database.)
Parameters:
method qstr [line 169]
Quotes a string to be sent to the database which is passed to function on to AdoDB->qstr().
Tags:
Overrides BitDb::qstr() (Quotes a string to be sent to the database)
Parameters:
method query [line 231]
an query(
pQuery
$query, [pValues
$values = FALSE], [pNumRows
$numrows = BIT_QUERY_DEFAULT], [pOffset
$offset = BIT_QUERY_DEFAULT], [
$pCacheTime = BIT_QUERY_DEFAULT])
|
|
Queries the database reporting an error if detected than exiting while printing the error. -rlpowell
Tags:
Overrides BitDb::query() (Queries the database reporting an error if detected)
Parameters:
method queryError [line 203]
an queryError(
pQuery
$pQuery, pError
&$pError, [pValues
$pValues = NULL], [pNumRows
$pNumRows = -1], [pOffset
$pOffset = -1])
|
|
Queries the database, returning an error if one occurs, rather than exiting while printing the error. -rlpowell
Tags:
Overrides BitDb::queryError() (Queries the database, returning an error if one occurs, rather)
Parameters:
method random [line 186]
Returns RANDOM function appropiate for database. Overrides BitDbBase::random()
Tags:
Overrides BitDb::random() (A database portable RANDOM() function.)
method RollbackTrans [line 608]
TRUE/FALSE. RollbackTrans(
)
|
|
If database does not support transactions, rollbacks always fail, so return FALSE otherwise returns TRUE if the Rollback was successful
Overrides BitDb::RollbackTrans() (If database does not support transactions, rollbacks always fail, so return false otherwise returns true if the Rollback was successful)
method SQLDate [line 513]
void SQLDate(
$pDateFormat, [
$pBaseDate = FALSE])
|
|
Format date column in sql string given an input format that understands Y M D
Overrides BitDb::SQLDate() (Format date column in sql string given an input format that understands Y M D)
Parameters:
method StartTrans [line 586]
Improved method of initiating a transaction. Used together with CompleteTrans(). Advantages include: a. StartTrans/CompleteTrans is nestable, unlike BeginTrans/CommitTrans/RollbackTrans. Only the outermost block is treated as a transaction. b. CompleteTrans auto-detects SQL errors, and will rollback on errors, commit otherwise. c. All BeginTrans/CommitTrans/RollbackTrans inside a StartTrans/CompleteTrans block are disabled, making it backward compatible.
Overrides BitDb::StartTrans() (Improved method of initiating a transaction. Used together with CompleteTrans().)
method substr [line 177]
Returns SUBSTRING function appropiate for database.
Tags:
method tableExists [line 129]
TRUE tableExists(
pTable
$pTable)
|
|
Used to check if tables already exists.
Tags:
Overrides BitDb::tableExists() (Used to check if tables already exists.)
Parameters:
|
|