MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_insert_hint

Method test_insert_hint

test/dialect/mssql/test_compiler.py:193–205  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

191 )
192
193 def test_insert_hint(self):
194 t = table("sometable", column("somecolumn"))
195 for targ in (None, t):
196 for darg in ("*", "mssql"):
197 self.assert_compile(
198 t.insert()
199 .values(somecolumn="x")
200 .with_hint(
201 "WITH (PAGLOCK)", selectable=targ, dialect_name=darg
202 ),
203 "INSERT INTO sometable WITH (PAGLOCK) "
204 "(somecolumn) VALUES (:somecolumn)",
205 )
206
207 def test_update_hint(self):
208 t = table("sometable", column("somecolumn"))

Callers

nothing calls this directly

Calls 6

tableFunction · 0.90
columnFunction · 0.90
assert_compileMethod · 0.80
with_hintMethod · 0.45
valuesMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected