Skip to content

Commit bf53ab8

Browse files
committed
Bugfix: processBulkInsert(), rawAggregation() & rawDsl() - close #19
1 parent 25f7994 commit bf53ab8

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Eloquent/Builder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,14 +644,14 @@ public function rawAggregation($dslBody, $options = []): array
644644
...$options,
645645
];
646646

647-
$results = $this->query->raw($dsl)->asArray();
647+
$results = $this->query->raw($dsl);
648648

649649
return $results['aggregations'] ?? [];
650650
}
651651

652652
public function rawDsl($dsl): array
653653
{
654-
return $this->query->raw($dsl)->asArray();
654+
return $this->query->raw($dsl);
655655
}
656656

657657
// ----------------------------------------------------------------------

src/Query/Processor.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,7 @@ public function processBulkInsert(Builder $query, $result): array
428428
{
429429
$this->rawResponse = $result;
430430
$this->query = $query;
431-
432-
$process = $result->asArray();
431+
$process = is_array($result) ? $result : $result->asArray();
433432

434433
$outcome = [
435434
'hasErrors' => $process['errors'],

0 commit comments

Comments
 (0)