Class: BitDbAdodb
Source Location: d:\website\PhpDocumentor\/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 49]
method Affected_Rows [line 618]
method CompleteTrans [line 584]
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 524]
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 460]
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 createTables [line 101]
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 549]
void debug(
[pLevel
$pLevel = 99])
|
|
will activate ADODB's native debugging output
Overrides BitDb::debug() (will activate ADODB like native debugging output)
Parameters:
method dropTables [line 152]
true dropTables(
pTables
$pTables)
|
|
Used to drop tables
Tags:
Overrides BitDb::dropTables() (Used to drop tables)
Parameters:
method GenID [line 438]
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 291]
void getAll(
$pQuery, [
$pValues = FALSE], [
$pCacheTime = BIT_QUERY_DEFAULT])
|
|
Parameters:
method getArray [line 345]
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 370]
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 320]
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 558]
returns the level of query debugging output
Tags:
Overrides BitDb::getDebugLevel() (returns the level of query debugging output)
method getOne [line 417]
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 393]
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 475]
a ifNull(
pField
$pField, pNullRepl
$pNullRepl)
|
|
A database portable IFNULL function.
Tags:
Overrides BitDb::ifNull() (A database portable IFNULL function.)
Parameters:
method ls [line 486]
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 273]
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 287]
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 611]
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 513]
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 182]
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 228]
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 queryError [line 199]
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 594]
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 496]
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 572]
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 tableExists [line 137]
true tableExists(
pTable
$pTable)
|
|
Used to check if tables already exists.
Tags:
Overrides BitDb::tableExists() (Used to check if tables already exists.)
Parameters:
|
|