Skip to content

Commit

Permalink
增加 offset 和 limit
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo committed Jul 8, 2024
1 parent 10d28e4 commit 788b667
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ public function size(int $size): static
return $this;
}

public function offset(int $offset): static
{
return $this->from($offset);
}

public function limit(int $limit): static
{
return $this->size($limit);
}

public function orderBy(string $field, string $direction = 'ASC'): static
{
$this->orderBy[] = [$field => $direction];
Expand Down

0 comments on commit 788b667

Please sign in to comment.