MediaWiki REL1_33
IDatabase.php
Go to the documentation of this file.
1<?php
20namespace Wikimedia\Rdbms;
21
22use InvalidArgumentException;
24use RuntimeException;
25use stdClass;
26
38interface IDatabase {
40 const TRIGGER_IDLE = 1;
42 const TRIGGER_COMMIT = 2;
44 const TRIGGER_ROLLBACK = 3;
46 const TRIGGER_CANCEL = 4;
47
49 const TRANSACTION_EXPLICIT = '';
51 const TRANSACTION_INTERNAL = 'implicit';
52
54 const ATOMIC_NOT_CANCELABLE = '';
56 const ATOMIC_CANCELABLE = 'cancelable';
57
59 const FLUSHING_ONE = '';
61 const FLUSHING_ALL_PEERS = 'flush';
63 const FLUSHING_INTERNAL = 'flush-internal';
64
66 const REMEMBER_NOTHING = '';
68 const REMEMBER_PRIOR = 'remember';
70 const RESTORE_PRIOR = 'prior';
72 const RESTORE_INITIAL = 'initial';
73
75 const ESTIMATE_TOTAL = 'total';
77 const ESTIMATE_DB_APPLY = 'apply';
78
80 const LIST_COMMA = 0;
82 const LIST_AND = 1;
84 const LIST_SET = 2;
86 const LIST_NAMES = 3;
88 const LIST_OR = 4;
89
91 const DBO_DEBUG = 1;
93 const DBO_NOBUFFER = 2;
95 const DBO_IGNORE = 4;
97 const DBO_TRX = 8;
99 const DBO_DEFAULT = 16;
101 const DBO_PERSISTENT = 32;
103 const DBO_SYSDBA = 64;
105 const DBO_DDLMODE = 128;
107 const DBO_SSL = 256;
109 const DBO_COMPRESS = 512;
110
112 const QUERY_SILENCE_ERRORS = 1; // b/c for 1.32 query() argument; note that (int)true = 1
117 const QUERY_PSEUDO_PERMANENT = 2;
119 const QUERY_REPLICA_ROLE = 4;
120
122 const UNION_ALL = true;
124 const UNION_DISTINCT = false;
125
133 public function getServerInfo();
134
155 public function bufferResults( $buffer = null );
156
165 public function trxLevel();
166
176 public function trxTimestamp();
177
182 public function explicitTrxActive();
183
189 public function assertNoOpenTransactions();
190
197 public function tablePrefix( $prefix = null );
198
204 public function dbSchema( $schema = null );
205
215 public function getLBInfo( $name = null );
216
225 public function setLBInfo( $name, $value = null );
226
233 public function setLazyMasterHandle( IDatabase $conn );
234
241 public function implicitGroupby();
242
249 public function implicitOrderby();
250
255 public function lastQuery();
256
264 public function doneWrites();
265
273 public function lastDoneWrites();
274
279 public function writesPending();
280
285 public function preCommitCallbacksPending();
286
295 public function writesOrCallbacksPending();
296
306 public function pendingWriteQueryDuration( $type = self::ESTIMATE_TOTAL );
307
314 public function pendingWriteCallers();
315
322 public function pendingWriteRowsAffected();
323
328 public function isOpen();
329
342 public function setFlag( $flag, $remember = self::REMEMBER_NOTHING );
343
356 public function clearFlag( $flag, $remember = self::REMEMBER_NOTHING );
357
364 public function restoreFlags( $state = self::RESTORE_PRIOR );
365
376 public function getFlag( $flag );
377
385 public function getDomainID();
386
393 public function getWikiID();
394
400 public function getType();
401
412 public function fetchObject( $res );
413
423 public function fetchRow( $res );
424
432 public function numRows( $res );
433
441 public function numFields( $res );
442
451 public function fieldName( $res, $n );
452
462 public function insertId();
463
471 public function dataSeek( $res, $row );
472
479 public function lastErrno();
480
487 public function lastError();
488
495 public function affectedRows();
496
505 public function getSoftwareLink();
506
513 public function getServerVersion();
514
525 public function close();
526
553 public function query( $sql, $fname = __METHOD__, $flags = 0 );
554
562 public function freeResult( $res );
563
583 public function selectField(
584 $table, $var, $cond = '', $fname = __METHOD__, $options = [], $join_conds = []
585 );
586
607 public function selectFieldValues(
608 $table, $var, $cond = '', $fname = __METHOD__, $options = [], $join_conds = []
609 );
610
772 public function select(
773 $table, $vars, $conds = '', $fname = __METHOD__,
774 $options = [], $join_conds = []
775 );
776
793 public function selectSQLText(
794 $table, $vars, $conds = '', $fname = __METHOD__,
795 $options = [], $join_conds = []
796 );
797
813 public function selectRow( $table, $vars, $conds, $fname = __METHOD__,
814 $options = [], $join_conds = []
815 );
816
839 public function estimateRowCount(
840 $table, $var = '*', $conds = '', $fname = __METHOD__, $options = [], $join_conds = []
841 );
842
861 public function selectRowCount(
862 $tables, $var = '*', $conds = '', $fname = __METHOD__, $options = [], $join_conds = []
863 );
864
876 public function lockForUpdate(
877 $table, $conds = '', $fname = __METHOD__, $options = [], $join_conds = []
878 );
879
889 public function fieldExists( $table, $field, $fname = __METHOD__ );
890
902 public function indexExists( $table, $index, $fname = __METHOD__ );
903
912 public function tableExists( $table, $fname = __METHOD__ );
913
947 public function insert( $table, $a, $fname = __METHOD__, $options = [] );
948
970 public function update( $table, $values, $conds, $fname = __METHOD__, $options = [] );
971
997 public function makeList( $a, $mode = self::LIST_COMMA );
998
1009 public function makeWhereFrom2d( $data, $baseKey, $subKey );
1010
1020 public function aggregateValue( $valuedata, $valuename = 'value' );
1021
1026 public function bitNot( $field );
1027
1033 public function bitAnd( $fieldLeft, $fieldRight );
1034
1040 public function bitOr( $fieldLeft, $fieldRight );
1041
1048 public function buildConcat( $stringList );
1049
1066 public function buildGroupConcatField(
1067 $delim, $table, $field, $conds = '', $join_conds = []
1068 );
1069
1082 public function buildSubString( $input, $startPosition, $length = null );
1083
1089 public function buildStringCast( $field );
1090
1096 public function buildIntegerCast( $field );
1097
1112 public function buildSelectSubquery(
1113 $table, $vars, $conds = '', $fname = __METHOD__,
1114 $options = [], $join_conds = []
1115 );
1116
1128 public function databasesAreIndependent();
1129
1141 public function selectDB( $db );
1142
1154 public function selectDomain( $domain );
1155
1160 public function getDBname();
1161
1166 public function getServer();
1167
1174 public function addQuotes( $s );
1175
1185 public function addIdentifierQuotes( $s );
1186
1203 public function buildLike();
1204
1210 public function anyChar();
1211
1217 public function anyString();
1218
1235 public function nextSequenceValue( $seqName );
1236
1262 public function replace( $table, $uniqueIndexes, $rows, $fname = __METHOD__ );
1263
1303 public function upsert(
1304 $table, array $rows, $uniqueIndexes, array $set, $fname = __METHOD__
1305 );
1306
1327 public function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds,
1328 $fname = __METHOD__
1329 );
1330
1342 public function delete( $table, $conds, $fname = __METHOD__ );
1343
1380 public function insertSelect( $destTable, $srcTable, $varMap, $conds,
1381 $fname = __METHOD__,
1382 $insertOptions = [], $selectOptions = [], $selectJoinConds = []
1383 );
1384
1391
1400 public function unionQueries( $sqls, $all );
1401
1429 $table, $vars, array $permute_conds, $extra_conds = '', $fname = __METHOD__,
1430 $options = [], $join_conds = []
1431 );
1432
1442 public function conditional( $cond, $trueVal, $falseVal );
1443
1454 public function strreplace( $orig, $old, $new );
1455
1462 public function getServerUptime();
1463
1471 public function wasDeadlock();
1472
1480 public function wasLockTimeout();
1481
1490 public function wasConnectionLoss();
1491
1497 public function wasReadOnlyError();
1498
1506 public function wasErrorReissuable();
1507
1522 public function masterPosWait( DBMasterPos $pos, $timeout );
1523
1530 public function getReplicaPos();
1531
1538 public function getMasterPos();
1539
1544 public function serverIsReadOnly();
1545
1567 public function onTransactionResolution( callable $callback, $fname = __METHOD__ );
1568
1601 public function onTransactionCommitOrIdle( callable $callback, $fname = __METHOD__ );
1602
1611 public function onTransactionIdle( callable $callback, $fname = __METHOD__ );
1612
1636 public function onTransactionPreCommitOrIdle( callable $callback, $fname = __METHOD__ );
1637
1661 public function onAtomicSectionCancel( callable $callback, $fname = __METHOD__ );
1662
1680 public function setTransactionListener( $name, callable $callback = null );
1681
1756 public function startAtomic( $fname = __METHOD__, $cancelable = self::ATOMIC_NOT_CANCELABLE );
1757
1769 public function endAtomic( $fname = __METHOD__ );
1770
1796 public function cancelAtomic( $fname = __METHOD__, AtomicSectionIdentifier $sectionId = null );
1797
1870 public function doAtomicSection(
1871 $fname, callable $callback, $cancelable = self::ATOMIC_NOT_CANCELABLE
1872 );
1873
1894 public function begin( $fname = __METHOD__, $mode = self::TRANSACTION_EXPLICIT );
1895
1916 public function commit( $fname = __METHOD__, $flush = '' );
1917
1938 public function rollback( $fname = __METHOD__, $flush = '' );
1939
1952 public function flushSnapshot( $fname = __METHOD__ );
1953
1965 public function timestamp( $ts = 0 );
1966
1980 public function timestampOrNull( $ts = null );
1981
1988 public function ping( &$rtt = null );
1989
1998 public function getLag();
1999
2014 public function getSessionLagStatus();
2015
2021 public function maxListLen();
2022
2032 public function encodeBlob( $b );
2033
2042 public function decodeBlob( $b );
2043
2056
2064 public function setSchemaVars( $vars );
2065
2075 public function lockIsFree( $lockName, $method );
2076
2088 public function lock( $lockName, $method, $timeout = 5 );
2089
2104 public function unlock( $lockName, $method );
2105
2127 public function getScopedLockAndFlush( $lockKey, $fname, $timeout );
2128
2135 public function namedLocksEnqueue();
2136
2144 public function getInfinity();
2145
2152 public function encodeExpiry( $expiry );
2153
2161 public function decodeExpiry( $expiry, $format = TS_MW );
2162
2172 public function setBigSelects( $value = true );
2173
2178 public function isReadOnly();
2179
2193 public function setTableAliases( array $aliases );
2194
2207 public function setIndexAliases( array $aliases );
2208}
2209
2213class_alias( IDatabase::class, 'IDatabase' );
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
if(defined( 'MW_SETUP_CALLBACK')) $fname
Customization point after all loading (constants, functions, classes, DefaultSettings,...
Definition Setup.php:123
Class used for token representing identifiers for atomic sections from IDatabase instances.
$res
Definition database.txt:21
static configuration should be added through ResourceLoaderGetConfigVars instead & $vars
Definition hooks.txt:2228
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction $rows
Definition hooks.txt:2818
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
Definition hooks.txt:1999
this hook is for auditing only RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist & $tables
Definition hooks.txt:996
$data
Utility to generate mapping file used in mw.Title (phpCharToUpper.json)
const LIST_NAMES
Definition Defines.php:54
const LIST_COMMA
Definition Defines.php:51
const LIST_SET
Definition Defines.php:53
const LIST_OR
Definition Defines.php:55
const LIST_AND
Definition Defines.php:52
An object representing a master or replica DB position in a replicated setup.
Basic database interface for live and lazy-loaded relation database handles.
Definition IDatabase.php:38
freeResult( $res)
Free a result object returned by query() or select().
onTransactionResolution(callable $callback, $fname=__METHOD__)
Run a callback as soon as the current transaction commits or rolls back.
onTransactionPreCommitOrIdle(callable $callback, $fname=__METHOD__)
Run a callback before the current transaction commits or now if there is none.
replace( $table, $uniqueIndexes, $rows, $fname=__METHOD__)
REPLACE query wrapper.
setSessionOptions(array $options)
Override database's default behavior.
buildGroupConcatField( $delim, $table, $field, $conds='', $join_conds=[])
Build a GROUP_CONCAT or equivalent statement for a query.
nextSequenceValue( $seqName)
Deprecated method, calls should be removed.
setLazyMasterHandle(IDatabase $conn)
Set a lazy-connecting DB handle to the master DB (for replication status purposes)
lastDoneWrites()
Returns the last time the connection may have been used for write queries.
unlock( $lockName, $method)
Release a lock.
namedLocksEnqueue()
Check to see if a named lock used by lock() use blocking queues.
setBigSelects( $value=true)
Allow or deny "big selects" for this session only.
estimateRowCount( $table, $var=' *', $conds='', $fname=__METHOD__, $options=[], $join_conds=[])
Estimate the number of rows in dataset.
selectRow( $table, $vars, $conds, $fname=__METHOD__, $options=[], $join_conds=[])
Single row SELECT wrapper.
addIdentifierQuotes( $s)
Quotes an identifier, in order to make user controlled input safe.
doneWrites()
Returns true if the connection may have been used for write queries.
wasLockTimeout()
Determines if the last failure was due to a lock timeout.
doAtomicSection( $fname, callable $callback, $cancelable=self::ATOMIC_NOT_CANCELABLE)
Perform an atomic section of reversable SQL statements from a callback.
selectSQLText( $table, $vars, $conds='', $fname=__METHOD__, $options=[], $join_conds=[])
The equivalent of IDatabase::select() except that the constructed SQL is returned,...
bitAnd( $fieldLeft, $fieldRight)
conditional( $cond, $trueVal, $falseVal)
Returns an SQL expression for a simple conditional.
getDomainID()
Return the currently selected domain ID.
lastErrno()
Get the last error number.
aggregateValue( $valuedata, $valuename='value')
Return aggregated value alias.
assertNoOpenTransactions()
Assert that all explicit transactions or atomic sections have been closed.
endAtomic( $fname=__METHOD__)
Ends an atomic section of SQL statements.
getServer()
Get the server hostname or IP address.
getWikiID()
Alias for getDomainID()
select( $table, $vars, $conds='', $fname=__METHOD__, $options=[], $join_conds=[])
Execute a SELECT query constructed using the various parameters provided.
isOpen()
Is a connection to the database open?
dataSeek( $res, $row)
Change the position of the cursor in a result object.
decodeExpiry( $expiry, $format=TS_MW)
Decode an expiry time into a DBMS independent format.
selectDB( $db)
Change the current database.
getReplicaPos()
Get the replication position of this replica DB.
setSchemaVars( $vars)
Set variables to be used in sourceFile/sourceStream, in preference to the ones in $GLOBALS.
tableExists( $table, $fname=__METHOD__)
Query whether a given table exists.
setTransactionListener( $name, callable $callback=null)
Run a callback after each time any transaction commits or rolls back.
getSoftwareLink()
Returns a wikitext link to the DB's website, e.g., return "[https://www.mysql.com/ MySQL]"; Should at...
setLBInfo( $name, $value=null)
Set the LB info array, or a member of it.
wasErrorReissuable()
Determines if the last query error was due to something outside of the query itself.
lockForUpdate( $table, $conds='', $fname=__METHOD__, $options=[], $join_conds=[])
Lock all rows meeting the given conditions/options FOR UPDATE.
setIndexAliases(array $aliases)
Convert certain index names to alternative names before querying the DB.
getLBInfo( $name=null)
Get properties passed down from the server info array of the load balancer.
restoreFlags( $state=self::RESTORE_PRIOR)
Restore the flags to their prior state before the last setFlag/clearFlag call.
insertSelect( $destTable, $srcTable, $varMap, $conds, $fname=__METHOD__, $insertOptions=[], $selectOptions=[], $selectJoinConds=[])
INSERT SELECT wrapper.
buildSubString( $input, $startPosition, $length=null)
Build a SUBSTRING function.
deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds, $fname=__METHOD__)
DELETE where the condition is a join.
wasConnectionLoss()
Determines if the last query error was due to a dropped connection.
fetchRow( $res)
Fetch the next row from the given result object, in associative array form.
getInfinity()
Find out when 'infinity' is.
lock( $lockName, $method, $timeout=5)
Acquire a named lock.
flushSnapshot( $fname=__METHOD__)
Commit any transaction but error out if writes or callbacks are pending.
affectedRows()
Get the number of rows affected by the last write query.
getServerUptime()
Determines how long the server has been up.
indexExists( $table, $index, $fname=__METHOD__)
Determines whether an index exists Usually throws a DBQueryError on failure If errors are explicitly ...
getServerInfo()
A string describing the current software version, and possibly other details in a user-friendly way.
buildLike()
LIKE statement wrapper, receives a variable-length argument list with parts of pattern to match conta...
makeWhereFrom2d( $data, $baseKey, $subKey)
Build a partial where clause from a 2-d array such as used for LinkBatch.
implicitOrderby()
Returns true if this database does an implicit order by when the column has an index For example: SEL...
anyChar()
Returns a token for buildLike() that denotes a '_' to be used in a LIKE query.
getFlag( $flag)
Returns a boolean whether the flag $flag is set for this connection.
lockIsFree( $lockName, $method)
Check to see if a named lock is not locked by any thread (non-blocking)
buildConcat( $stringList)
Build a concatenation list to feed into a SQL query.
clearFlag( $flag, $remember=self::REMEMBER_NOTHING)
Clear a flag for this connection.
pendingWriteRowsAffected()
Get the number of affected rows from pending write queries.
pendingWriteQueryDuration( $type=self::ESTIMATE_TOTAL)
Get the time spend running write queries for this transaction.
lastQuery()
Return the last query that went through IDatabase::query()
numFields( $res)
Get the number of fields in a result object.
anyString()
Returns a token for buildLike() that denotes a '' to be used in a LIKE query.
addQuotes( $s)
Adds quotes and backslashes.
fieldName( $res, $n)
Get a field name in a result object.
buildSelectSubquery( $table, $vars, $conds='', $fname=__METHOD__, $options=[], $join_conds=[])
Equivalent to IDatabase::selectSQLText() except wraps the result in Subqyery.
timestamp( $ts=0)
Convert a timestamp in one of the formats accepted by wfTimestamp() to the format used for inserting ...
selectDomain( $domain)
Set the current domain (database, schema, and table prefix)
lastError()
Get a description of the last error.
maxListLen()
Return the maximum number of items allowed in a list, or 0 for unlimited.
selectField( $table, $var, $cond='', $fname=__METHOD__, $options=[], $join_conds=[])
A SELECT wrapper which returns a single field from a single result row.
getType()
Get the type of the DBMS, as it appears in $wgDBtype.
implicitGroupby()
Returns true if this database does an implicit sort when doing GROUP BY.
getLag()
Get the amount of replication lag for this database server.
getSessionLagStatus()
Get the replica DB lag when the current transaction started or a general lag estimate if not transact...
unionSupportsOrderAndLimit()
Returns true if current database backend supports ORDER BY or LIMIT for separate subqueries within th...
bitOr( $fieldLeft, $fieldRight)
onTransactionCommitOrIdle(callable $callback, $fname=__METHOD__)
Run a callback as soon as there is no transaction pending.
rollback( $fname=__METHOD__, $flush='')
Rollback a transaction previously started using begin().
update( $table, $values, $conds, $fname=__METHOD__, $options=[])
UPDATE wrapper.
close()
Close the database connection.
makeList( $a, $mode=self::LIST_COMMA)
Makes an encoded list of strings from an array.
fetchObject( $res)
Fetch the next row from the given result object, in object form.
wasDeadlock()
Determines if the last failure was due to a deadlock.
encodeExpiry( $expiry)
Encode an expiry time into the DBMS dependent format.
tablePrefix( $prefix=null)
Get/set the table prefix.
selectRowCount( $tables, $var=' *', $conds='', $fname=__METHOD__, $options=[], $join_conds=[])
Get the number of rows in dataset.
setTableAliases(array $aliases)
Make certain table names use their own database, schema, and table prefix when passed into SQL querie...
databasesAreIndependent()
Returns true if DBs are assumed to be on potentially different servers.
numRows( $res)
Get the number of rows in a query result.
ping(&$rtt=null)
Ping the server and try to reconnect if it there is no connection.
masterPosWait(DBMasterPos $pos, $timeout)
Wait for the replica DB to catch up to a given master position.
getScopedLockAndFlush( $lockKey, $fname, $timeout)
Acquire a named lock, flush any transaction, and return an RAII style unlocker object.
decodeBlob( $b)
Some DBMSs return a special placeholder object representing blob fields in result objects.
onAtomicSectionCancel(callable $callback, $fname=__METHOD__)
Run a callback when the atomic section is cancelled.
fieldExists( $table, $field, $fname=__METHOD__)
Determines whether a field exists in a table.
query( $sql, $fname=__METHOD__, $flags=0)
Run an SQL query and return the result.
upsert( $table, array $rows, $uniqueIndexes, array $set, $fname=__METHOD__)
INSERT ON DUPLICATE KEY UPDATE wrapper, upserts an array into a table.
insert( $table, $a, $fname=__METHOD__, $options=[])
INSERT wrapper, inserts an array into a table.
encodeBlob( $b)
Some DBMSs have a special format for inserting into blob fields, they don't allow simple quoted strin...
getServerVersion()
A string describing the current software version, like from mysql_get_server_info().
begin( $fname=__METHOD__, $mode=self::TRANSACTION_EXPLICIT)
Begin a transaction.
selectFieldValues( $table, $var, $cond='', $fname=__METHOD__, $options=[], $join_conds=[])
A SELECT wrapper which returns a list of single field values from result rows.
wasReadOnlyError()
Determines if the last failure was due to the database being read-only.
trxLevel()
Gets the current transaction level.
startAtomic( $fname=__METHOD__, $cancelable=self::ATOMIC_NOT_CANCELABLE)
Begin an atomic section of SQL statements.
unionConditionPermutations( $table, $vars, array $permute_conds, $extra_conds='', $fname=__METHOD__, $options=[], $join_conds=[])
Construct a UNION query for permutations of conditions.
insertId()
Get the inserted value of an auto-increment row.
strreplace( $orig, $old, $new)
Returns a command for str_replace function in SQL query.
setFlag( $flag, $remember=self::REMEMBER_NOTHING)
Set a flag for this connection.
commit( $fname=__METHOD__, $flush='')
Commits a transaction previously started using begin().
trxTimestamp()
Get the UNIX timestamp of the time that the transaction was established.
getMasterPos()
Get the position of this master.
getDBname()
Get the current DB name.
writesOrCallbacksPending()
Whether there is a transaction open with either possible write queries or unresolved pre-commit/commi...
bufferResults( $buffer=null)
Turns buffering of SQL result sets on (true) or off (false).
pendingWriteCallers()
Get the list of method names that did write queries for this transaction.
cancelAtomic( $fname=__METHOD__, AtomicSectionIdentifier $sectionId=null)
Cancel an atomic section of SQL statements.
unionQueries( $sqls, $all)
Construct a UNION query This is used for providing overload point for other DB abstractions not compa...
dbSchema( $schema=null)
Get/set the db schema.
timestampOrNull( $ts=null)
Convert a timestamp in one of the formats accepted by wfTimestamp() to the format used for inserting ...
onTransactionIdle(callable $callback, $fname=__METHOD__)
Alias for onTransactionCommitOrIdle() for backwards-compatibility.
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))
$buffer
if(is_array($mode)) switch( $mode) $input
const DBO_NOBUFFER
Definition defines.php:10
const DBO_DDLMODE
Definition defines.php:16
const DBO_SYSDBA
Definition defines.php:15
const DBO_COMPRESS
Definition defines.php:18
const DBO_DEFAULT
Definition defines.php:13
const DBO_SSL
Definition defines.php:17
const DBO_IGNORE
Definition defines.php:11
const DBO_PERSISTENT
Definition defines.php:14
const DBO_DEBUG
Definition defines.php:9
const DBO_TRX
Definition defines.php:12