Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 1
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2/**
3 * @license GPL-2.0-or-later
4 */
5
6namespace MediaWiki\Utils;
7
8/**
9 * Interface for generating updates to single rows in the database.
10 *
11 * @stable to implement
12 * @ingroup Maintenance
13 */
14interface RowUpdateGenerator {
15    /**
16     * Given a database row, generates an array mapping column names to
17     * updated value within the database row.
18     *
19     * Sample Response:
20     *   return [
21     *       'some_col' => 'new value',
22     *       'other_col' => 99,
23     *   ];
24     *
25     * @param \stdClass $row A row from the database
26     * @return array Map of column names to updated value within the
27     *  database row. When no update is required returns an empty array.
28     */
29    public function update( $row );
30}
31
32/** @deprecated class alias since 1.46 */
33class_alias( RowUpdateGenerator::class, 'RowUpdateGenerator' );