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

Method test_insert_hint

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

Source from the content-addressed store, hash-verified

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