Skip to content

Commit 5bad354

Browse files
committed
Add warning to cqlengine docs about LWT and batch statements
1 parent 4ed4b8a commit 5bad354

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

cassandra/cqlengine/query.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import six
2020
from warnings import warn
2121

22-
from cassandra.query import SimpleStatement, BatchType as CBatchType
22+
from cassandra.query import SimpleStatement, BatchType as CBatchType, BatchStatement
2323
from cassandra.cqlengine import columns, CQLEngineException, ValidationError, UnicodeMixin
2424
from cassandra.cqlengine import connection as conn
2525
from cassandra.cqlengine.functions import Token, BaseQueryFunction, QueryValue
@@ -67,7 +67,9 @@ class MultipleObjectsReturned(QueryException):
6767

6868
def check_applied(result):
6969
"""
70-
Raises LWTException if it looks like a failed LWT request.
70+
Raises LWTException if it looks like a failed LWT request. A LWTException
71+
won't be raised in the special case in which there are several failed LWT
72+
in a :class:`~cqlengine.query.BatchQuery`.
7173
"""
7274
try:
7375
applied = result.was_applied

tests/integration/cqlengine/test_lwt_conditional.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ def test_batch_update_conditional(self):
142142
updated = TestConditionalModel.objects(id=id).first()
143143
self.assertEqual(updated.text, 'something else')
144144

145+
@unittest.skip("Skipping until PYTHON-943 is resolved")
145146
def test_batch_update_conditional_several_rows(self):
146147
sync_table(TestUpdateModel)
147148
self.addCleanup(drop_table, TestUpdateModel)

0 commit comments

Comments
 (0)