changeset draft

This commit is contained in:
2018-08-04 20:50:00 +02:00
parent fabc3ad24e
commit 3a7a41a9cb
2 changed files with 92 additions and 1 deletions
+69
View File
@@ -0,0 +1,69 @@
<?php
namespace App\Tables;
/**
* Object representing a set of table modifications
*/
class Changeset
{
/**
* Rows whose content changed
*
* @var array|null - [GRID -> values, ...]
*/
public $rowUpdates;
/**
* New rows in the full Row::data format, including GRIDs.
* Values are identified by GCIDs from previously defined, or new columns.
*
* @var array|null - [[_id:..., ...], [..., ...], ...]
*/
public $newRows;
/**
* Rows to be removed
*
* @var int[]|null - GRIDs
*/
public $removedRows;
/**
* Values changed in column specifications, such as name, title, etc.
* This does not affect the table rows in any way.
*
* @var array[] - column specification objects, with GCIDs
*/
public $columnUpdates;
/**
* New columns in the full format, including GCIDs
*
* @var array|null - [[id:..., ...], [..., ...], ...]
*/
public $newColumns;
/**
* When reordering columns, here is the column IDs array
* in the new order. Columns meanwhile removed from the table
* or added to it are to be ignored or appended at the end.
*
* This shall not be filled if merely editing or adding columns,
* unless the order is explicitly adjusted by the user.
*
* @var string[]|null - GCIDs
*/
public $columnOrder;
/**
* Columns to be removed
*
* The data associated to those columns may or may not be removed from the Rows.
* It does not matter, other than in regard to the table size.
*
* @var int[]|null - GCIDs
*/
public $removedColumns;
}