Class: BitDbPear
Source Location: /kernel/BitDbPear.php
BitDb
|
--BitDbPear
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 __construct [line 35]
BitDbPear __construct(
[
$pPearDsn = NULL], [
$pPearOptions = NULL])
|
|
Parameters:
method Affected_Rows [line 440]
method CompleteTrans [line 402]
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 CreateSequence [line 323]
0 CreateSequence(
[pSequenceName
$seqname = 'adodbseq'], [pStartID
$startID = 1])
|
|
A database portable Sequence management function.
Tags:
Overrides BitDb::CreateSequence() (A database portable Sequence management function.)
Parameters:
method Execute [line 170]
void Execute(
$pQuery, [
$pNumRows = false], [
$zf_cache = false], [
$pCacheTime = BIT_QUERY_DEFAULT])
|
|
compatibility function
Overrides BitDb::Execute() (ADODB compatibility functions for bitcommerce)
Parameters:
method GenID [line 299]
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 221]
void getAll(
$pQuery, [
$pValues = FALSE], [
$pCacheTime = BIT_QUERY_DEFAULT])
|
|
Parameters:
method getArray [line 208]
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 241]
the getAssoc(
pQuery
$pQuery, [pValues
$pValues = array()], [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 185]
the getCol(
pQuery
$pQuery, [pValues
$pValues = array()], [pForceArray
$pTrim = FALSE], pFirst2Cols
3)
|
|
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 getOne [line 280]
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 260]
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 338]
a ifNull(
pField
$pField, pNullRepl
$pNullRepl)
|
|
A database portable IFNULL function.
Tags:
Overrides BitDb::ifNull() (A database portable IFNULL function.)
Parameters:
method ls [line 349]
Format the timestamp in the format the database accepts.
Tags:
Overrides BitDb::ls() (Format the timestamp in the format the database accepts.)
Parameters:
method MetaTables [line 432]
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 376]
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 84]
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 129]
an query(
pQuery
$query, [pValues
$values = null], [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 queryComplete [line 157]
method queryError [line 101]
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 RollbackTrans [line 414]
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 359]
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 390]
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().)
|
|