Skip to content

Commit

Permalink
Added count, first and last feature for select result
Browse files Browse the repository at this point in the history
  • Loading branch information
emagombe committed Dec 15, 2019
1 parent 2ffc7ae commit 9160c6b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions queryBuilder/QueryProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ private static function select($sql) {
$result->data = $data;
$result->json = json_encode($data);
$result->object = (object) $data;
$result->first = (object) $data[0];
$result->last = (object) $data[count($data) - 1];
$result->count = count($data);

return $result;
}
}

0 comments on commit 9160c6b

Please sign in to comment.