Skip to content

Commit 78eb085

Browse files
committed
fixed QueryStatistic for http transport
1 parent 4a46fd2 commit 78eb085

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Query/QueryStatistic.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class QueryStatistic
5353
* @param float $time
5454
* @param null|int $rowsBeforeLimitAtLeast
5555
*/
56-
public function __construct(int $rows, int $bytes, float $time, ?int $rowsBeforeLimitAtLeast)
56+
public function __construct(int $rows, int $bytes, float $time, ?int $rowsBeforeLimitAtLeast = null)
5757
{
5858
$this->rows = $rows;
5959
$this->bytes = $bytes;

src/Transport/HttpTransport.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,8 @@ protected function assembleResult(ResponseInterface $response): Result
394394
$statistic = new QueryStatistic(
395395
$result['statistics']['rows_read'] ?? 0,
396396
$result['statistics']['bytes_read'] ?? 0,
397-
$result['statistics']['elapsed'] ?? 0
397+
$result['statistics']['elapsed'] ?? 0,
398+
$result['rows_before_limit_at_least'] ?? null
398399
);
399400

400401
return new Result($result['data'] ?? [], $statistic);

0 commit comments

Comments
 (0)