MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_delete_hint

Method test_delete_hint

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

Source from the content-addressed store, hash-verified

232 )
233
234 def test_delete_hint(self):
235 t = table("sometable", column("somecolumn"))
236 for targ in (None, t):
237 for darg in ("*", "mssql"):
238 self.assert_compile(
239 t.delete()
240 .where(t.c.somecolumn == "q")
241 .with_hint(
242 "WITH (PAGLOCK)", selectable=targ, dialect_name=darg
243 ),
244 "DELETE FROM sometable WITH (PAGLOCK) "
245 "WHERE sometable.somecolumn = :somecolumn_1",
246 )
247
248 def test_delete_exclude_hint(self):
249 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
whereMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected