(
&'p self,
compiler: &mut SelectCompiler<'p, 'q, Entity>,
_: Option<&'p Self::CompilationParameters>,
_: &QueryTemporalAxes,
)
| 155 | } |
| 156 | |
| 157 | fn compile<'p, 'q: 'p>( |
| 158 | &'p self, |
| 159 | compiler: &mut SelectCompiler<'p, 'q, Entity>, |
| 160 | _: Option<&'p Self::CompilationParameters>, |
| 161 | _: &QueryTemporalAxes, |
| 162 | ) -> Result<Self::Indices, Report<SelectCompilerError>> |
| 163 | where |
| 164 | 's: 'q, |
| 165 | { |
| 166 | if let Some(cursor) = self.cursor() { |
| 167 | self.paths |
| 168 | .iter() |
| 169 | .zip(&cursor.values) |
| 170 | .map(|(sorting_record, parameter)| { |
| 171 | let expression = (*parameter != CursorField::Json(PropertyValue::Null)) |
| 172 | .then(|| compiler.add_parameter(parameter)); |
| 173 | compiler.add_cursor_selection( |
| 174 | &sorting_record.path, |
| 175 | identity, |
| 176 | expression, |
| 177 | sorting_record.ordering, |
| 178 | sorting_record.nulls, |
| 179 | ) |
| 180 | }) |
| 181 | .collect() |
| 182 | } else { |
| 183 | Ok(self |
| 184 | .paths |
| 185 | .iter() |
| 186 | .map(|sorting_record| { |
| 187 | compiler.add_distinct_selection_with_ordering( |
| 188 | &sorting_record.path, |
| 189 | Distinctness::Distinct, |
| 190 | Some((sorting_record.ordering, sorting_record.nulls)), |
| 191 | ) |
| 192 | }) |
| 193 | .collect()) |
| 194 | } |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | #[cfg(test)] |
nothing calls this directly
no test coverage detected