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

Method test_with_hint_table

test/sql/test_compiler.py:6183–6199  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6181 )
6182
6183 def test_with_hint_table(self):
6184 stmt = (
6185 select(table1)
6186 .select_from(
6187 table1.join(table2, table1.c.myid == table2.c.otherid)
6188 )
6189 .with_hint(table1, "use some_hint")
6190 )
6191
6192 # note that some dialects instead use the "with_select_hint"
6193 # hook to put the 'hint' up front
6194 eq_ignore_whitespace(
6195 str(stmt),
6196 "SELECT mytable.myid, mytable.name, mytable.description "
6197 "FROM mytable [use some_hint] "
6198 "JOIN myothertable ON mytable.myid = myothertable.otherid",
6199 )
6200
6201 def test_with_hint_statement(self):
6202 stmt = (

Callers

nothing calls this directly

Calls 5

selectFunction · 0.90
eq_ignore_whitespaceFunction · 0.90
with_hintMethod · 0.45
select_fromMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected