Gets the data from the supplied columns from all of the supplied result rows
NOTE: Keys are preserved.
final public static GetAllDataFromColumns ( array $ResultRows, array $Columns ) : |
||
$ResultRows | array | The result rows to get the data from |
$Columns | array | The columns to get the from |
Результат | The data of the supplied columns |
protected final function GroupRowsByColumnValues(array $ResultRows, array $Columns) { $GroupedRelatedRows = []; $GroupByKeys = Relational\ResultRow::GetAllDataFromColumns($ResultRows, $Columns); foreach ($ResultRows as $Key => $ResultRow) { $Hash = $GroupByKeys[$Key]->HashData(); if (!isset($GroupedRelatedRows[$Hash])) { $GroupedRelatedRows[$Hash] = []; } $GroupedRelatedRows[$Hash][] = $ResultRow; } return $GroupedRelatedRows; }
protected final function IndexRowsByHashedColumnValues(array $ResultRows, array $Columns) { $KeyedRows = []; $ColumnDataArray = Relational\ResultRow::GetAllDataFromColumns($ResultRows, $Columns); foreach ($ResultRows as $Key => $Row) { $Hash = $ColumnDataArray[$Key]->HashData(); $KeyedRows[$Hash] = $Row; } return $KeyedRows; }