static method getPeriodFormat [line 684]
static void getPeriodFormat(
$pPeriod)
|
|
Tags:
Parameters:
constructor BitDb [line 96]
During initialisation, database parameters are passed to the class.
If these parameters are not valid, class will not be initialised.
method Affected_Rows [line 1013]
method associateInsert [line 466]
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 499]
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 996]
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 893]
Returns the keyword to force a column comparison to be case sensitive
for none case-sensitive databases (eg MySQL)
Tags:
method convertQuery [line 759]
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 794]
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 816]
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 1090]
method convert_sortmode [line 1076]
void convert_sortmode(
$pSortMode)
|
|
Tags:
Parameters:
method convert_sortmode_one_item [line 1083]
void convert_sortmode_one_item(
$pSortMode)
|
|
Tags:
Parameters:
method CreateSequence [line 543]
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 255]
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 962]
a dbByteDecode(
pData
&$pData)
|
|
Used to decode blob data (eg PostgreSQL)
Tags:
Parameters:
method dbByteEncode [line 939]
escaped dbByteEncode(
pData
&$pData)
|
|
Used to encode blob data (eg PostgreSQL). Can be called statically
Tags:
Parameters:
method db_byte_decode [line 1111]
void db_byte_decode(
&$pData)
|
|
Tags:
Parameters:
method db_byte_encode [line 1104]
void db_byte_encode(
&$pData)
|
|
Tags:
Parameters:
method debug [line 187]
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 1115]
void depText(
$pFrom,
$pTo)
|
|
Parameters:
method dropTables [line 277]
true dropTables(
pTables
$pTables)
|
|
Used to drop tables
Tags:
Overridden in child classes as:
- BitDbAdodb::dropTables()
- Used to drop tables
Parameters:
method Execute [line 341]
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 530]
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 418]
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 431]
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 1055]
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 208]
true getCaseSensitivity(
[
$pSensitivity = TRUE])
|
|
Sets the case sensitivity mode which is used in convertQuery
Tags:
Parameters:
method getCol [line 406]
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 getDatabaseVersion [line 1031]
determine current version of the databse
Tags:
method getDebugLevel [line 194]
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 454]
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 442]
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 556]
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 1020]
void isAdvancedPostgresEnabled(
)
|
|
Check for Postgres specific extensions
method isCachingActive [line 295]
nothing isCachingActive(
pCacheExecute
0)
|
|
Function to set ADODB query caching member variable
Parameters:
method isFatalActive [line 167]
Determines if the database connection is valid
Tags:
method isValid [line 160]
Determines if the database connection is valid
Tags:
method ls [line 588]
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 376]
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 390]
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 362]
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 597]
Return the current timestamp literal relevent to the database type
Tags:
method OffsetDate [line 748]
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 132]
This function contains any post-connection work
Tags:
method preDBConnection [line 111]
This function contains any pre-connection work
Tags:
method qstr [line 304]
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 614]
Return the current timestamp literal relevent to the database type
Tags:
method query [line 334]
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 226]
method queryError [line 320]
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 180]
Used to start query timer if in debug mode
method random [line 566]
A database portable RANDOM() function.
Adodb overrides it anyway with it's $rand property.
Tags:
Overridden in child classes as:
- BitDbAdodb::random()
- Returns RANDOM function appropiate for database.
method RollbackTrans [line 1006]
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 286]
nothing setCaching(
[pCacheExecute
$pCacheFlag = TRUE])
|
|
Function to set ADODB query caching member variable
Parameters:
method setCaseSensitivity [line 201]
true setCaseSensitivity(
[
$pSensitivity = TRUE])
|
|
Sets the case sensitivity mode which is used in convertQuery
Tags:
Parameters:
method setFatalActive [line 174]
true setFatalActive(
[
$pActive = TRUE])
|
|
Determines if the database connection is valid
Tags:
Parameters:
method sqlCast [line 911]
the sqlCast(
pVar
$pVar, pType
$pType)
|
|
Used to cast variable types for certain databases (ie SyBase & MSSQL)
Tags:
Parameters:
method SQLDate [line 731]
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 713]
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 663]
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 SQLTimestampToInt [line 634]
the SQLTimestampToInt(
pColumn
$pColumn)
|
|
Return the sql to cast the given column from a time stamp to a Unix epoch
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 1097]
void sql_cast(
$pVar,
$pType)
|
|
Tags:
Parameters:
method StartTrans [line 984]
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 265]
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: