(&self, body: DefId, block: BasicBlockId)
| 222 | |
| 223 | impl<'heap, A: Allocator> PreparedQueries<'heap, A> { |
| 224 | pub fn find(&self, body: DefId, block: BasicBlockId) -> Option<&PreparedQuery<'heap, A>> { |
| 225 | let start = self.offsets[body]; |
| 226 | let end = self.offsets[body.plus(1)]; |
| 227 | |
| 228 | self.queries[start..end] |
| 229 | .iter() |
| 230 | .find(|(id, _)| *id == block) |
| 231 | .map(|(_, query)| query) |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | /// Compiles Postgres-targeted MIR islands into a single PostgreSQL `SELECT`. |