(
self, meth: str, order_by: bool = True, distinct: bool = True
)
| 382 | self._no_criterion_assertion("get", order_by=False, distinct=False) |
| 383 | |
| 384 | def _no_criterion_assertion( |
| 385 | self, meth: str, order_by: bool = True, distinct: bool = True |
| 386 | ) -> None: |
| 387 | if not self._enable_assertions: |
| 388 | return |
| 389 | if ( |
| 390 | self._where_criteria |
| 391 | or self._statement is not None |
| 392 | or self._from_obj |
| 393 | or self._setup_joins |
| 394 | or self._limit_clause is not None |
| 395 | or self._offset_clause is not None |
| 396 | or self._group_by_clauses |
| 397 | or (order_by and self._order_by_clauses) |
| 398 | or (distinct and self._distinct) |
| 399 | ): |
| 400 | raise sa_exc.InvalidRequestError( |
| 401 | "Query.%s() being called on a " |
| 402 | "Query with existing criterion. " % meth |
| 403 | ) |
| 404 | |
| 405 | def _no_criterion_condition( |
| 406 | self, meth: str, order_by: bool = True, distinct: bool = True |
no outgoing calls