Skip to content

Commit

Permalink
Add reset_limit and reset_offset to SelectStatement (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 authored Jun 3, 2021
1 parent 0fe6ac7 commit 9d94334
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/query/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 9d94334

Please sign in to comment.