constructor BitDb [line 91]
During initialisation, database parameters are passed to the class.
If these parameters are not valid, class will not be initialised.
method Affected_Rows [line 938]
method associateInsert [line 454]
Error associateInsert(
insertTable
$insertTable, insertData
$insertData)
|
|
This function will take a set of fields identified by an associative array - $insertData
generate a suitable SQL script and insert the data into the specified table - $insertTable
Tags:
Parameters:
method associateUpdate [line 487]
Error associateUpdate(
updateTable
$updateTable, updateData
$updateData, updateId
$updateId)
|
|
This function will take a set of fields identified by an associative array - $updateData
generate a suitable SQL script update the data into the specified table at the location identified in updateId which holds a name and value entry
Tags:
Parameters:
method CompleteTrans [line 921]
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:
Overridden in child classes as:
- BitDbAdodb::CompleteTrans()
- Used together with StartTrans() to end a transaction. Monitors connection for sql errors, and will commit or rollback as appropriate.
- BitDbPear::CompleteTrans()
- Used together with StartTrans() to end a transaction. Monitors connection for sql errors, and will commit or rollback as appropriate.
method convertBinary [line 818]
Returns the keyword to force a column comparison to be case sensitive
for none case-sensitive databases (eg MySQL)
Tags:
method convertQuery [line 674]
the convertQuery(
pQuery
&$pQuery)
|
|
Converts backtick (`) quotes to the appropriate quote for the database.
Tags:
Overridden in child classes as:
- BitDbAdodb::convertQuery()
- Converts backtick (`) quotes to the appropriate quote for the database.
Parameters:
method convertSortmode [line 708]
the convertSortmode(
string
$pSortMode)
|
|
Converts field sorting abbreviation to SQL - you can pass in a single string or an entire array of sortmodes
Tags:
Parameters:
method convertSortmodeOneItem [line 730]
valid, convertSortmodeOneItem(
array
$pSortMode)
|
|
Converts field sorting abbreviation to SQL and it also allows us to do things like sort by random rows.
Tags:
Parameters:
method convert_binary [line 994]
method convert_sortmode [line 984]
void convert_sortmode(
$pSortMode)
|
|
Renamed a few functions - these are the temporary backward compatability calls with the deprecated note
These funcitons will be removed in due course
Parameters:
method convert_sortmode_one_item [line 989]
void convert_sortmode_one_item(
$pSortMode)
|
|
Parameters:
method CreateSequence [line 531]
0 CreateSequence(
[pSequenceName
$seqname = 'adodbseq'], [pStartID
$startID = 1])
|
|
A database portable Sequence management function.
Tags:
Overridden in child classes as:
- BitDbAdodb::CreateSequence()
- A database portable Sequence management function.
- BitDbPear::CreateSequence()
- A database portable Sequence management function.
Parameters:
method createTables [line 243]
true|false createTables(
pTables
$pTables, [pOptions
$pOptions = array()])
|
|
Used to create tables - most commonly from package/schema_inc.php files
Tags:
Overridden in child classes as:
- BitDbAdodb::createTables()
- Used to create tables - most commonly from package/schema_inc.php files
Parameters:
method dbByteDecode [line 887]
a dbByteDecode(
pData
&$pData)
|
|
Used to decode blob data (eg PostgreSQL)
Tags:
Parameters:
method dbByteEncode [line 864]
escaped dbByteEncode(
pData
&$pData)
|
|
Used to encode blob data (eg PostgreSQL). Can be called statically
Tags:
Parameters:
method db_byte_decode [line 1009]
void db_byte_decode(
&$pData)
|
|
Parameters:
method db_byte_encode [line 1004]
void db_byte_encode(
&$pData)
|
|
Parameters:
method debug [line 179]
void debug(
[pLevel
$pLevel = 99])
|
|
will activate ADODB like native debugging output
Overridden in child classes as:
- BitDbAdodb::debug()
- will activate ADODB's native debugging output
Parameters:
method depText [line 1014]
void depText(
$pFrom,
$pTo)
|
|
Parameters:
method dropTables [line 265]
true dropTables(
pTables
$pTables)
|
|
Used to drop tables
Tags:
Overridden in child classes as:
- BitDbAdodb::dropTables()
- Used to drop tables
Parameters:
method Execute [line 329]
void Execute(
$pQuery, [
$pNumRows = false], [
$zf_cache = false], [
$pCacheTime = BIT_QUERY_DEFAULT])
|
|
ADODB compatibility functions for bitcommerce
Overridden in child classes as:
- BitDbPear::Execute()
- compatibility function
Parameters:
method GenID [line 518]
0 GenID(
pSequenceName
$pSequenceName, [
$pUseDbPrefix = true])
|
|
A database portable Sequence management function.
Tags:
Overridden in child classes as:
- BitDbAdodb::GenID()
- A database portable Sequence management function.
- BitDbPear::GenID()
- A database portable Sequence management function.
Parameters:
method getArray [line 406]
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:
Overridden in child classes as:
- BitDbAdodb::getArray()
- Returns an associative array for the given query.
- BitDbPear::getArray()
- Returns an associative array for the given query.
Parameters:
method getAssoc [line 419]
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:
Overridden in child classes as:
- BitDbAdodb::getAssoc()
- Returns an associative array for the given query.
- BitDbPear::getAssoc()
- Returns an associative array for the given query.
Parameters:
method getCaselessColumn [line 966]
void getCaselessColumn(
$pColumn)
|
|
Compatibility function for DBs with case insensitive searches
(like MySQL, see: http://dev.mysql.com/doc/refman/5.1/en/case-sensitivity.html) How to use: AND ".$this->mDb->getCaseLessColumn('lc.title')." = 'page title' The reason all this matters is that huge performane difference between: where title = 'PAGE TITLE' and where UPPER(tittle) = 'PAGE TITTLE' The latter version will not make use of the index on page title (at least for MySQl) while the first vesion will use the index. In a case insensitive search DB (MySQL) both forms of the query will give the same results, the only difference being the preformance. Spiderr suggested this solution and suppled the code below
Parameters:
method getCaseSensitivity [line 200]
true getCaseSensitivity(
[
$pSensitivity = TRUE])
|
|
Sets the case sensitivity mode which is used in convertQuery
Tags:
Parameters:
method getCol [line 394]
the getCol(
pQuery
$pQuery, [pValues
$pValues = FALSE], [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:
Overridden in child classes as:
- BitDbAdodb::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.
- BitDbPear::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 186]
returns the level of query debugging output
Tags:
Overridden in child classes as:
- BitDbAdodb::getDebugLevel()
- returns the level of query debugging output
method getOne [line 442]
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:
Overridden in child classes as:
- BitDbAdodb::getOne()
- Returns a single column value from the database.
- BitDbPear::getOne()
- Returns a single column value from the database.
Parameters:
method getRow [line 430]
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:
Overridden in child classes as:
- BitDbAdodb::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.
- BitDbPear::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 544]
a ifNull(
pField
$pField, pNullRepl
$pNullRepl)
|
|
A database portable IFNULL function.
Tags:
Overridden in child classes as:
- BitDbAdodb::ifNull()
- A database portable IFNULL function.
- BitDbPear::ifNull()
- A database portable IFNULL function.
Parameters:
method isAdvancedPostgresEnabled [line 945]
void isAdvancedPostgresEnabled(
)
|
|
Check for Postgres specific extensions
method isCachingActive [line 283]
nothing isCachingActive(
pCacheExecute
0)
|
|
Function to set ADODB query caching member variable
Parameters:
method isFatalActive [line 159]
Determines if the database connection is valid
Tags:
method isValid [line 152]
Determines if the database connection is valid
Tags:
method ls [line 554]
Format the timestamp in the format the database accepts.
Tags:
Overridden in child classes as:
- BitDbAdodb::ls()
- Format the timestamp in the format the database accepts.
- BitDbPear::ls()
- Format the timestamp in the format the database accepts.
Parameters:
method MetaColumns [line 364]
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:
Overridden in child classes as:
- BitDbAdodb::MetaColumns()
- List columns in a database as an array of ADOFieldObjects.
Parameters:
method MetaIndexes [line 378]
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:
Overridden in child classes as:
- BitDbAdodb::MetaIndexes()
- List indexes in a database as an array of ADOFieldObjects.
Parameters:
method MetaTables [line 350]
array MetaTables(
[ttype
$ttype = false], [showSchema
$showSchema = false], [mask
$mask = false])
|
|
Create a list of tables available in the current database
Tags:
Overridden in child classes as:
- BitDbAdodb::MetaTables()
- Create a list of tables available in the current database
- BitDbPear::MetaTables()
- Create a list of tables available in the current database
Parameters:
method NOW [line 563]
Return the current timestamp literal relevent to the database type
Tags:
method OffsetDate [line 663]
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:
Overridden in child classes as:
- BitDbAdodb::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.
- BitDbPear::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 postDBConnection [line 127]
This function contains any post-connection work
Tags:
method preDBConnection [line 106]
This function contains any pre-connection work
Tags:
method qstr [line 292]
Quotes a string to be sent to the database
Tags:
Overridden in child classes as:
- BitDbAdodb::qstr()
- Quotes a string to be sent to the database which is passed to function on to AdoDB->qstr().
- BitDbPear::qstr()
- Quotes a string to be sent to the database which is passed to function on to AdoDB->qstr().
Parameters:
method qtNOW [line 580]
Return the current timestamp literal relevent to the database type
Tags:
method query [line 322]
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:
Overridden in child classes as:
- BitDbAdodb::query()
- Queries the database reporting an error if detected
- BitDbPear::query()
- Queries the database reporting an error if detected
Parameters:
method queryComplete [line 217]
method queryError [line 308]
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:
Overridden in child classes as:
- BitDbAdodb::queryError()
- Queries the database, returning an error if one occurs, rather
- BitDbPear::queryError()
- Queries the database, returning an error if one occurs, rather
Parameters:
method queryStart [line 172]
Used to start query timer if in debug mode
method RollbackTrans [line 931]
true/false. RollbackTrans(
)
|
|
If database does not support transactions, rollbacks always fail, so return false otherwise returns true if the Rollback was successful
Overridden in child classes as:
- BitDbAdodb::RollbackTrans()
- If database does not support transactions, rollbacks always fail, so return false otherwise returns true if the Rollback was successful
- BitDbPear::RollbackTrans()
- If database does not support transactions, rollbacks always fail, so return false otherwise returns true if the Rollback was successful
method setCaching [line 274]
nothing setCaching(
[pCacheExecute
$pCacheFlag = TRUE])
|
|
Function to set ADODB query caching member variable
Parameters:
method setCaseSensitivity [line 193]
true setCaseSensitivity(
[
$pSensitivity = TRUE])
|
|
Sets the case sensitivity mode which is used in convertQuery
Tags:
Parameters:
method setFatalActive [line 166]
true setFatalActive(
[
$pActive = TRUE])
|
|
Determines if the database connection is valid
Tags:
Parameters:
method sqlCast [line 836]
the sqlCast(
pVar
$pVar, pType
$pType)
|
|
Used to cast variable types for certain databases (ie SyBase & MSSQL)
Tags:
Parameters:
method SQLDate [line 646]
void SQLDate(
$pDateFormat, [
$pBaseDate = false])
|
|
Format date column in sql string given an input format that understands Y M D
Overridden in child classes as:
- BitDbAdodb::SQLDate()
- Format date column in sql string given an input format that understands Y M D
- BitDbPear::SQLDate()
- Format date column in sql string given an input format that understands Y M D
Parameters:
method SQLForUpdate [line 628]
the SQLForUpdate(
pColumn
0)
|
|
Return the sql to lock selected rows for updating.
ADODB has no native support for this, see http://phplens.com/lens/lensforum/msgs.php?id=13661&x=1
Tags:
Parameters:
method SQLIntToTimestamp [line 600]
the SQLIntToTimestamp(
pColumn
$pColumn)
|
|
Return the sql to cast the given column from an long integer to a time stamp.
this is most useful for the many places bitweaver stores time as epoch integers ADODB has no native support for this, see http://phplens.com/lens/lensforum/msgs.php?id=13661&x=1
Tags:
Parameters:
method sql_cast [line 999]
void sql_cast(
$pVar,
$pType)
|
|
Parameters:
method StartTrans [line 909]
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.
Overridden in child classes as:
- BitDbAdodb::StartTrans()
- Improved method of initiating a transaction. Used together with CompleteTrans().
- BitDbPear::StartTrans()
- Improved method of initiating a transaction. Used together with CompleteTrans().
method tableExists [line 253]
true tableExists(
pTable
$pTable)
|
|
Used to check if tables already exists.
Tags:
Overridden in child classes as:
- BitDbAdodb::tableExists()
- Used to check if tables already exists.
Parameters: