(
self, meth: str, order_by: bool = True, distinct: bool = True
)
| 397 | self._no_criterion_assertion(class="st">"get", order_by=False, distinct=False) |
| 398 | |
| 399 | def _no_criterion_assertion( |
| 400 | self, meth: str, order_by: bool = True, distinct: bool = True |
| 401 | ) -> None: |
| 402 | if not self._enable_assertions: |
| 403 | return |
| 404 | if ( |
| 405 | self._where_criteria |
| 406 | or self._statement is not None |
| 407 | or self._from_obj |
| 408 | or self._setup_joins |
| 409 | or self._limit_clause is not None |
| 410 | or self._offset_clause is not None |
| 411 | or self._group_by_clauses |
| 412 | or (order_by and self._order_by_clauses) |
| 413 | or (distinct and self._distinct) |
| 414 | ): |
| 415 | raise sa_exc.InvalidRequestError( |
| 416 | class="st">"Query.%s() being called on a " |
| 417 | class="st">"Query with existing criterion. " % meth |
| 418 | ) |
| 419 | |
| 420 | def _no_criterion_condition( |
| 421 | self, meth: str, order_by: bool = True, distinct: bool = True |
no outgoing calls