MCPcopy
hub / github.com/django/django / has_for_update_sql

Method has_for_update_sql

tests/select_for_update/tests.py:81–85  ·  view source on GitHub ↗
(self, queries, **kwargs)

Source from the content-addressed store, hash-verified

79 self.new_connection.set_autocommit(True)
80
81 def has_for_update_sql(self, queries, **kwargs):
82 # Examine the SQL that was executed to determine whether it
83 # contains the 'SELECT..FOR UPDATE' stanza.
84 for_update_sql = connection.ops.for_update_sql(**kwargs)
85 return any(for_update_sql in query["sql"] for query in queries)
86
87 @skipUnlessDBFeature("has_select_for_update")
88 def test_for_update_sql_generated(self):

Calls 1

for_update_sqlMethod · 0.80

Tested by

no test coverage detected