Force queries not to use indexing. *Use only for testing.*
(self)
| 1213 | _check_column = _get_column_instance |
| 1214 | |
| 1215 | def _disable_indexing_in_queries(self) -> None: |
| 1216 | """Force queries not to use indexing. |
| 1217 | |
| 1218 | *Use only for testing.* |
| 1219 | |
| 1220 | """ |
| 1221 | if not self._enabled_indexing_in_queries: |
| 1222 | return # already disabled |
| 1223 | # The nail avoids setting/getting compiled conditions in/from |
| 1224 | # the cache where indexing is used. |
| 1225 | self._condition_cache.nail() |
| 1226 | self._enabled_indexing_in_queries = False |
| 1227 | |
| 1228 | def _enable_indexing_in_queries(self) -> None: |
| 1229 | """Allow queries to use indexing. |