Limit the number of rows returned `skip` - Number of rows to skip before fetch any row. `fetch` - Maximum number of rows to fetch, after skipping `skip` rows, if specified.
(self, skip: usize, fetch: Option<usize>)
| 654 | /// `fetch` - Maximum number of rows to fetch, after skipping `skip` rows, |
| 655 | /// if specified. |
| 656 | pub fn limit(self, skip: usize, fetch: Option<usize>) -> Result<Self> { |
| 657 | let skip_expr = if skip == 0 { |
| 658 | None |
| 659 | } else { |
| 660 | Some(lit(skip as i64)) |
| 661 | }; |
| 662 | let fetch_expr = fetch.map(|f| lit(f as i64)); |
| 663 | self.limit_by_expr(skip_expr, fetch_expr) |
| 664 | } |
| 665 | |
| 666 | /// Limit the number of rows returned |
| 667 | /// |
nothing calls this directly
no test coverage detected