MediaWiki REL1_35
BatchRowWriter Class Reference
Collaboration diagram for BatchRowWriter:

Public Member Functions

 __construct (IDatabase $db, $table, $clusterName=false)
 
 write (array $updates)
 

Protected Attributes

string false $clusterName
 A cluster name valid for use with LBFactory.
 
IDatabase $db
 The database to write to.
 
string $table
 The name of the table to update.
 

Detailed Description

Definition at line 27 of file BatchRowWriter.php.

Constructor & Destructor Documentation

◆ __construct()

BatchRowWriter::__construct ( IDatabase  $db,
  $table,
  $clusterName = false 
)
Parameters
IDatabase$dbThe database to write to
string$tableThe name of the table to update
string | false$clusterNameA cluster name valid for use with LBFactory

Definition at line 48 of file BatchRowWriter.php.

References $clusterName, $db, and $table.

Member Function Documentation

◆ write()

BatchRowWriter::write ( array  $updates)
Parameters
array[][]$updatesArray of arrays each containing two keys, 'primaryKey' and 'changes'. primaryKey must contain a map of column names to values sufficient to uniquely identify the row. changes must contain a map of column names to update values to apply to the row. -param array<int,array{primaryKey:array,changes:array}> $updates

Definition at line 61 of file BatchRowWriter.php.

Member Data Documentation

◆ $clusterName

string false BatchRowWriter::$clusterName
protected

A cluster name valid for use with LBFactory.

Definition at line 41 of file BatchRowWriter.php.

Referenced by __construct().

◆ $db

IDatabase BatchRowWriter::$db
protected

The database to write to.

Definition at line 31 of file BatchRowWriter.php.

Referenced by __construct().

◆ $table

string BatchRowWriter::$table
protected

The name of the table to update.

Definition at line 36 of file BatchRowWriter.php.

Referenced by __construct().


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