From 9d943340f5e9e6c04bf8c51605556362708892d2 Mon Sep 17 00:00:00 2001 From: Billy Chan <30400950+billy1624@users.noreply.github.com> Date: Thu, 3 Jun 2021 15:17:39 +0800 Subject: [PATCH] Add `reset_limit` and `reset_offset` to `SelectStatement` (#55) --- src/query/select.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/query/select.rs b/src/query/select.rs index e8ec51ab9..7077194fd 100644 --- a/src/query/select.rs +++ b/src/query/select.rs @@ -1191,6 +1191,12 @@ impl SelectStatement { self } + /// Reset limit + pub fn reset_limit(&mut self) -> &mut Self { + self.limit = None; + self + } + /// Offset number of returned rows. /// /// # Examples @@ -1222,6 +1228,12 @@ impl SelectStatement { self.offset = Some(Value::BigUnsigned(offset)); self } + + /// Reset offset + pub fn reset_offset(&mut self) -> &mut Self { + self.offset = None; + self + } } impl QueryStatementBuilder for SelectStatement {