BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
DatabaseMysqli Class Reference
Inheritance diagram for DatabaseMysqli:
Collaboration diagram for DatabaseMysqli:

Public Member Functions

 insertId ()
 
 lastErrno ()
 
 affectedRows ()
 
 selectDB ($db)
 
 __toString ()
 
- Public Member Functions inherited from DatabaseMysqlBase
 __construct (array $params)
 
 getType ()
 
 open ($server, $user, $password, $dbName)
 
 freeResult ($res)
 
 fetchObject ($res)
 
 fetchRow ($res)
 
 numRows ($res)
 
 numFields ($res)
 
 fieldName ($res, $n)
 
 fieldType ($res, $n)
 
 dataSeek ($res, $row)
 
 lastError ()
 
 replace ($table, $uniqueIndexes, $rows, $fname=__METHOD__)
 
 estimateRowCount ($table, $vars= '*', $conds= '', $fname=__METHOD__, $options=[])
 
 fieldInfo ($table, $field)
 
 indexInfo ($table, $index, $fname=__METHOD__)
 
 strencode ($s)
 
 addIdentifierQuotes ($s)
 
 isQuotedIdentifier ($name)
 
 ping ()
 
 getLag ()
 
 getApproximateLagStatus ()
 
 masterPosWait (DBMasterPos $pos, $timeout)
 
 getSlavePos ()
 
 getMasterPos ()
 
 useIndexClause ($index)
 
 lowPriorityOption ()
 
 getSoftwareLink ()
 
 getServerVersion ()
 
 setSessionOptions (array $options)
 
 streamStatementEnd (&$sql, &$newLine)
 
 lockIsFree ($lockName, $method)
 
 lock ($lockName, $method, $timeout=5)
 
 unlock ($lockName, $method)
 
 namedLocksEnqueue ()
 
 lockTables ($read, $write, $method, $lowPriority=true)
 
 unlockTables ($method)
 
 getSearchEngine ()
 
 setBigSelects ($value=true)
 
 deleteJoin ($delTable, $joinTable, $delVar, $joinVar, $conds, $fname=__METHOD__)
 
 upsert ($table, array $rows, array $uniqueIndexes, array $set, $fname=__METHOD__)
 
 getServerUptime ()
 
 wasDeadlock ()
 
 wasLockTimeout ()
 
 wasErrorReissuable ()
 
 wasReadOnlyError ()
 
 wasConnectionError ($errno)
 
 duplicateTableStructure ($oldName, $newName, $temporary=false, $fname=__METHOD__)
 
 listTables ($prefix=null, $fname=__METHOD__)
 
 dropTable ($tableName, $fName=__METHOD__)
 
 getMysqlStatus ($which="%")
 
 listViews ($prefix=null, $fname=__METHOD__)
 
 isView ($name, $prefix=null)
 
- Public Member Functions inherited from DatabaseBase
 getServerInfo ()
 
 getDelimiter ()
 
 debug ($debug=null)
 
 bufferResults ($buffer=null)
 
 trxLevel ()
 
 trxTimestamp ()
 
 tablePrefix ($prefix=null)
 
 dbSchema ($schema=null)
 
 setFileHandle ($fh)
 
 getLBInfo ($name=null)
 
 setLBInfo ($name, $value=null)
 
 setLazyMasterHandle (IDatabase $conn)
 
 getLazyMasterHandle ()
 
 setTransactionProfiler (TransactionProfiler $profiler)
 
 cascadingDeletes ()
 
 cleanupTriggers ()
 
 strictIPs ()
 
 realTimestamps ()
 
 implicitGroupby ()
 
 implicitOrderby ()
 
 searchableIPs ()
 
 functionalIndexes ()
 
 lastQuery ()
 
 doneWrites ()
 
 lastDoneWrites ()
 
 writesPending ()
 
 writesOrCallbacksPending ()
 
 pendingWriteQueryDuration ()
 
 pendingWriteCallers ()
 
 isOpen ()
 
 setFlag ($flag)
 
 clearFlag ($flag)
 
 getFlag ($flag)
 
 getProperty ($name)
 
 getWikiID ()
 
 getSchemaPath ()
 
 getUpdateKeysPath ()
 
 indexInfo ($table, $index, $fname=__METHOD__)
 
 strencode ($s)
 
 __construct (array $params)
 
 __sleep ()
 
 connectionErrorHandler ($errno, $errstr)
 
 close ()
 
 reportConnectionError ($error= 'Unknown error')
 
 query ($sql, $fname=__METHOD__, $tempIgnore=false)
 
 reportQueryError ($error, $errno, $sql, $fname, $tempIgnore=false)
 
 execute ($prepared, $args=null)
 
 fillPrepared ($preparedQuery, $args)
 
 freeResult ($res)
 
 selectField ($table, $var, $cond= '', $fname=__METHOD__, $options=[])
 
 selectFieldValues ($table, $var, $cond= '', $fname=__METHOD__, $options=[], $join_conds=[])
 
 makeSelectOptions ($options)
 
 makeGroupByWithHaving ($options)
 
 makeOrderBy ($options)
 
 select ($table, $vars, $conds= '', $fname=__METHOD__, $options=[], $join_conds=[])
 
 selectSQLText ($table, $vars, $conds= '', $fname=__METHOD__, $options=[], $join_conds=[])
 
 selectRow ($table, $vars, $conds, $fname=__METHOD__, $options=[], $join_conds=[])
 
 estimateRowCount ($table, $vars= '*', $conds= '', $fname=__METHOD__, $options=[])
 
 selectRowCount ($tables, $vars= '*', $conds= '', $fname=__METHOD__, $options=[], $join_conds=[])
 
 fieldExists ($table, $field, $fname=__METHOD__)
 
 indexExists ($table, $index, $fname=__METHOD__)
 
 tableExists ($table, $fname=__METHOD__)
 
 indexUnique ($table, $index)
 
 insert ($table, $a, $fname=__METHOD__, $options=[])
 
 update ($table, $values, $conds, $fname=__METHOD__, $options=[])
 
 makeList ($a, $mode=LIST_COMMA)
 
 makeWhereFrom2d ($data, $baseKey, $subKey)
 
 aggregateValue ($valuedata, $valuename= 'value')
 
 bitNot ($field)
 
 bitAnd ($fieldLeft, $fieldRight)
 
 bitOr ($fieldLeft, $fieldRight)
 
 buildConcat ($stringList)
 
 buildGroupConcatField ($delim, $table, $field, $conds= '', $join_conds=[])
 
 selectDB ($db)
 
 getDBname ()
 
 getServer ()
 
 tableName ($name, $format= 'quoted')
 
 tableNames ()
 
 tableNamesN ()
 
 tableNameWithAlias ($name, $alias=false)
 
 tableNamesWithAlias ($tables)
 
 fieldNameWithAlias ($name, $alias=false)
 
 fieldNamesWithAlias ($fields)
 
 addQuotes ($s)
 
 addIdentifierQuotes ($s)
 
 isQuotedIdentifier ($name)
 
 buildLike ()
 
 anyChar ()
 
 anyString ()
 
 nextSequenceValue ($seqName)
 
 useIndexClause ($index)
 
 replace ($table, $uniqueIndexes, $rows, $fname=__METHOD__)
 
 upsert ($table, array $rows, array $uniqueIndexes, array $set, $fname=__METHOD__)
 
 deleteJoin ($delTable, $joinTable, $delVar, $joinVar, $conds, $fname=__METHOD__)
 
 textFieldSize ($table, $field)
 
 lowPriorityOption ()
 
 delete ($table, $conds, $fname=__METHOD__)
 
 insertSelect ($destTable, $srcTable, $varMap, $conds, $fname=__METHOD__, $insertOptions=[], $selectOptions=[])
 
 limitResult ($sql, $limit, $offset=false)
 
 unionSupportsOrderAndLimit ()
 
 unionQueries ($sqls, $all)
 
 conditional ($cond, $trueVal, $falseVal)
 
 strreplace ($orig, $old, $new)
 
 getServerUptime ()
 
 wasDeadlock ()
 
 wasLockTimeout ()
 
 wasErrorReissuable ()
 
 wasReadOnlyError ()
 
 wasConnectionError ($errno)
 
 masterPosWait (DBMasterPos $pos, $timeout)
 
 getSlavePos ()
 
 getMasterPos ()
 
 onTransactionIdle ($callback)
 
 onTransactionPreCommitOrIdle ($callback)
 
 startAtomic ($fname=__METHOD__)
 
 endAtomic ($fname=__METHOD__)
 
 doAtomicSection ($fname, $callback)
 
 begin ($fname=__METHOD__)
 
 commit ($fname=__METHOD__, $flush= '')
 
 rollback ($fname=__METHOD__, $flush= '')
 
 duplicateTableStructure ($oldName, $newName, $temporary=false, $fname=__METHOD__)
 
 listTables ($prefix=null, $fname=__METHOD__)
 
 clearViewsCache ()
 
 listViews ($prefix=null, $fname=__METHOD__)
 
 isView ($name)
 
 timestamp ($ts=0)
 
 timestampOrNull ($ts=null)
 
 ping ()
 
 getSessionLagStatus ()
 
 getTransactionLagStatus ()
 
 getApproximateLagStatus ()
 
 getLag ()
 
 maxListLen ()
 
 encodeBlob ($b)
 
 decodeBlob ($b)
 
 setSessionOptions (array $options)
 
 sourceFile ($filename, $lineCallback=false, $resultCallback=false, $fname=false, $inputCallback=false)
 
 patchPath ($patch)
 
 setSchemaVars ($vars)
 
 sourceStream ($fp, $lineCallback=false, $resultCallback=false, $fname=__METHOD__, $inputCallback=false)
 
 streamStatementEnd (&$sql, &$newLine)
 
 lockIsFree ($lockName, $method)
 
 lock ($lockName, $method, $timeout=5)
 
 unlock ($lockName, $method)
 
 getScopedLockAndFlush ($lockKey, $fname, $timeout)
 
 namedLocksEnqueue ()
 
 lockTables ($read, $write, $method, $lowPriority=true)
 
 unlockTables ($method)
 
 dropTable ($tableName, $fName=__METHOD__)
 
 getSearchEngine ()
 
 getInfinity ()
 
 encodeExpiry ($expiry)
 
 decodeExpiry ($expiry, $format=TS_MW)
 
 setBigSelects ($value=true)
 
 isReadOnly ()
 
 __toString ()
 
 __destruct ()
 
- Public Member Functions inherited from IDatabase
 selectFieldValues ($table, $var, $cond= '', $fname=__METHOD__, $options=[])
 

Protected Member Functions

 doQuery ($sql)
 
 mysqlConnect ($realServer)
 
 connectInitCharset ()
 
 mysqlSetCharset ($charset)
 
 closeConnection ()
 
 mysqlFreeResult ($res)
 
 mysqlFetchObject ($res)
 
 mysqlFetchArray ($res)
 
 mysqlNumRows ($res)
 
 mysqlNumFields ($res)
 
 mysqlFetchField ($res, $n)
 
 mysqlFieldName ($res, $n)
 
 mysqlFieldType ($res, $n)
 
 mysqlDataSeek ($res, $row)
 
 mysqlError ($conn=null)
 
 mysqlRealEscapeString ($s)
 
 mysqlPing ()
 
- Protected Member Functions inherited from DatabaseMysqlBase
 connectInitCharset ()
 
 mysqlConnect ($realServer)
 
 mysqlSetCharset ($charset)
 
 mysqlFreeResult ($res)
 
 mysqlFetchObject ($res)
 
 mysqlFetchArray ($res)
 
 mysqlNumRows ($res)
 
 mysqlNumFields ($res)
 
 mysqlFieldName ($res, $n)
 
 mysqlFieldType ($res, $n)
 
 mysqlDataSeek ($res, $row)
 
 mysqlError ($conn=null)
 
 mysqlFetchField ($res, $n)
 
 mysqlRealEscapeString ($s)
 
 mysqlPing ()
 
 getLagDetectionMethod ()
 
 getLagFromSlaveStatus ()
 
 getLagFromPtHeartbeat ()
 
 getMasterServerInfo ()
 
 getHeartbeatData (array $conds)
 
 getBindingHandle ()
 
 getDefaultSchemaVars ()
 
- Protected Member Functions inherited from DatabaseBase
 ignoreErrors ($ignoreErrors=null)
 
 getTransactionProfiler ()
 
 installErrorHandler ()
 
 restoreErrorHandler ()
 
 getLogContext (array $extras=[])
 
 assertOpen ()
 
 closeConnection ()
 
 doQuery ($sql)
 
 isWriteQuery ($sql)
 
 isTransactableQuery ($sql)
 
 prepare ($sql, $func= 'DatabaseBase::prepare')
 
 freePrepared ($prepared)
 
 fillPreparedArg ($matches)
 
 makeInsertOptions ($options)
 
 makeUpdateOptionsArray ($options)
 
 makeUpdateOptions ($options)
 
 tableNamesWithUseIndexOrJOIN ($tables, $use_index=[], $join_conds=[])
 
 indexName ($index)
 
 escapeLikeInternal ($s)
 
 nativeReplace ($table, $rows, $fname)
 
 runOnTransactionIdleCallbacks ()
 
 runOnTransactionPreCommitCallbacks ()
 
 doBegin ($fname)
 
 doCommit ($fname)
 
 doRollback ($fname)
 
 resultObject ($result)
 
 replaceVars ($ins)
 
 getSchemaVars ()
 
 getDefaultSchemaVars ()
 
 getReadOnlyReason ()
 

Protected Attributes

 $mConn
 
- Protected Attributes inherited from DatabaseMysqlBase
 $lastKnownSlavePos
 
 $lagDetectionMethod
 
 $lagDetectionOptions = []
 
- Protected Attributes inherited from DatabaseBase
 $mLastQuery = ''
 
 $mDoneWrites = false
 
 $mPHPError = false
 
 $mServer
 
 $srvCache
 
 $mConn = null
 
 $mOpened = false
 
 $mTrxIdleCallbacks = []
 
 $mTrxPreCommitCallbacks = []
 
 $mTablePrefix
 
 $mSchema
 
 $mFlags
 
 $mForeign
 
 $mLBInfo = []
 
 $mDefaultBigSelects = null
 
 $mSchemaVars = false
 
 $mSessionVars = []
 
 $preparedArgs
 
 $htmlErrors
 
 $delimiter = ';'
 
 $mTrxLevel = 0
 
 $mTrxShortId = ''
 
 $fileHandle = null
 
 $allViews = null
 
 $trxProfiler
 

Additional Inherited Members

- Static Public Member Functions inherited from DatabaseBase
static factory ($dbType, $p=[])
 
- Public Attributes inherited from DatabaseBase
const DEADLOCK_TRIES = 4
 
const DEADLOCK_DELAY_MIN = 500000
 
const DEADLOCK_DELAY_MAX = 1500000
 
 $mUser
 
 $mPassword
 
 $mDBname
 
- Static Protected Member Functions inherited from DatabaseBase
static generalizeSQL ($sql)
 

Detailed Description

Database abstraction object for PHP extension mysqli.

Since
1.22
See Also
Database

Member Function Documentation

DatabaseMysqli::__toString ( )

Give an id for the connection

mysql driver used resource id, but mysqli objects cannot be cast to string.

Returns
string
DatabaseMysqli::affectedRows ( )
Returns
int

Implements IDatabase.

DatabaseMysqli::closeConnection ( )
protected
Returns
bool
DatabaseMysqli::doQuery (   $sql)
protected
Parameters
string$sql
Returns
resource
DatabaseMysqli::insertId ( )
Returns
int

Implements IDatabase.

DatabaseMysqli::lastErrno ( )
Returns
int

Implements IDatabase.

DatabaseMysqli::mysqlConnect (   $realServer)
protected
Parameters
string$realServer
Returns
bool|mysqli
Exceptions
DBConnectionError
DatabaseMysqli::mysqlDataSeek (   $res,
  $row 
)
protected
Parameters
resource | ResultWrapper$res
int$row
Returns
mixed
DatabaseMysqli::mysqlError (   $conn = null)
protected
Parameters
mysqli$connOptional connection object
Returns
string
DatabaseMysqli::mysqlFetchArray (   $res)
protected
Parameters
mysqli$res
Returns
bool
DatabaseMysqli::mysqlFetchField (   $res,
  $n 
)
protected
Parameters
mysqli$res
int$n
Returns
mixed
DatabaseMysqli::mysqlFetchObject (   $res)
protected
Parameters
mysqli$res
Returns
bool
DatabaseMysqli::mysqlFieldName (   $res,
  $n 
)
protected
Parameters
resource | ResultWrapper$res
int$n
Returns
mixed
DatabaseMysqli::mysqlFieldType (   $res,
  $n 
)
protected
Parameters
resource | ResultWrapper$res
int$n
Returns
mixed
DatabaseMysqli::mysqlFreeResult (   $res)
protected
Parameters
mysqli$res
Returns
bool
DatabaseMysqli::mysqlNumFields (   $res)
protected
Parameters
mysqli$res
Returns
mixed
DatabaseMysqli::mysqlNumRows (   $res)
protected
Parameters
mysqli$res
Returns
mixed
DatabaseMysqli::mysqlRealEscapeString (   $s)
protected

Escapes special characters in a string for use in an SQL statement

Parameters
string$s
Returns
string
DatabaseMysqli::mysqlSetCharset (   $charset)
protected
Parameters
string$charset
Returns
bool
DatabaseMysqli::selectDB (   $db)
Parameters
string$db
Returns
bool

Implements IDatabase.


The documentation for this class was generated from the following file: