MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / _with_hint

Method _with_hint

lib/sqlalchemy/sql/selectable.py:586–603  ·  view source on GitHub ↗
(
        self,
        selectable: Optional[_FromClauseArgument],
        text: str,
        dialect_name: str,
    )

Source from the content-addressed store, hash-verified

584 return self._with_hint(selectable, text, dialect_name)
585
586 def _with_hint(
587 self,
588 selectable: Optional[_FromClauseArgument],
589 text: str,
590 dialect_name: str,
591 ) -> Self:
592 if selectable is None:
593 self._statement_hints += ((dialect_name, text),)
594 else:
595 self._hints = self._hints.union(
596 {
597 (
598 coercions.expect(roles.FromClauseRole, selectable),
599 dialect_name,
600 ): text
601 }
602 )
603 return self
604
605
606class FromClause(roles.AnonymizedFromClauseRole, Selectable):

Callers 2

with_statement_hintMethod · 0.95
with_hintMethod · 0.95

Calls 1

unionMethod · 0.45

Tested by

no test coverage detected