|
|
@ -4,6 +4,7 @@ |
|
|
|
namespace App\Tables; |
|
|
|
namespace App\Tables; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use App\Models\Row; |
|
|
|
use App\Models\Table; |
|
|
|
use App\Models\Table; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -127,6 +128,7 @@ abstract class BaseExporter |
|
|
|
$count = $revision->rows()->count(); |
|
|
|
$count = $revision->rows()->count(); |
|
|
|
|
|
|
|
|
|
|
|
$start = 0; |
|
|
|
$start = 0; |
|
|
|
|
|
|
|
|
|
|
|
$rq = $revision->rowsData($this->columns, false); |
|
|
|
$rq = $revision->rowsData($this->columns, false); |
|
|
|
|
|
|
|
|
|
|
|
$columns = $this->columns; |
|
|
|
$columns = $this->columns; |
|
|
@ -134,6 +136,7 @@ abstract class BaseExporter |
|
|
|
// TODO raw query to allow selecting aggregates, column subsets, etc |
|
|
|
// TODO raw query to allow selecting aggregates, column subsets, etc |
|
|
|
if (count($columns)) $rq = $rq->sortByCol($columns[0]); |
|
|
|
if (count($columns)) $rq = $rq->sortByCol($columns[0]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Row::disableCasts(); |
|
|
|
while ($start < $count) { |
|
|
|
while ($start < $count) { |
|
|
|
$rows = $rq->offset($start)->limit($chunkSize)->get()->toArray(); |
|
|
|
$rows = $rq->offset($start)->limit($chunkSize)->get()->toArray(); |
|
|
|
|
|
|
|
|
|
|
@ -144,6 +147,7 @@ abstract class BaseExporter |
|
|
|
|
|
|
|
|
|
|
|
$start += $chunkSize; |
|
|
|
$start += $chunkSize; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Row::enableCasts(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|