Execute a limit operation
(
&self,
count: usize,
offset: Option<usize>,
input_rows: Vec<Row>,
)
| 6123 | |
| 6124 | /// Execute a limit operation |
| 6125 | fn execute_limit( |
| 6126 | &self, |
| 6127 | count: usize, |
| 6128 | offset: Option<usize>, |
| 6129 | input_rows: Vec<Row>, |
| 6130 | ) -> Result<Vec<Row>, ExecutionError> { |
| 6131 | let offset_val = offset.unwrap_or(0); |
| 6132 | |
| 6133 | // Skip offset rows and take only count rows |
| 6134 | let limited_rows: Vec<Row> = input_rows |
| 6135 | .into_iter() |
| 6136 | .skip(offset_val) |
| 6137 | .take(count) |
| 6138 | .collect(); |
| 6139 | |
| 6140 | Ok(limited_rows) |
| 6141 | } |
| 6142 | |
| 6143 | /// Execute full-text search operation |
| 6144 | fn node_matches_properties( |
no test coverage detected