Skip to content

Commit

Permalink
refactor: add clear_order_by for num_items (#2030)
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo-nakano-desu committed Jan 10, 2024
1 parent c334434 commit 3dc66aa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/executor/paginator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ where
SelectStatement::new()
.expr(Expr::cust("COUNT(*) AS num_items"))
.from_subquery(
self.query.clone().reset_limit().reset_offset().to_owned(),
self.query
.clone()
.reset_limit()
.reset_offset()
.clear_order_by()
.to_owned(),
Alias::new("sub_query"),
),
);
Expand Down

0 comments on commit 3dc66aa

Please sign in to comment.