add column unique numbering scheme, more efficient selects

This commit is contained in:
2018-08-04 19:57:59 +02:00
parent 69bda25bbb
commit fabc3ad24e
23 changed files with 452 additions and 173 deletions
+5 -6
View File
@@ -128,14 +128,13 @@ abstract class BaseExporter
$start = 0;
while ($start < $count) {
$rows = $revision->rows()->offset($start)->limit($chunkSize)->get();
// TODO raw query to allow selecting aggregates, column subsets, etc
$rows = $revision->rowsData($this->columns, false)
->offset($start)->limit($chunkSize)->get()->toArray();
foreach ($rows as $row) {
$data = $row->data;
// column renaming, value formatting...
yield $data;
unset($row['_row_pivot']);
yield $row;
}
$start += $chunkSize;