MCPcopy Index your code
hub / github.com/apache/cassandra-python-driver / delete

Method delete

cassandra/cqlengine/query.py:992–1008  ·  view source on GitHub ↗

Deletes the contents of a query

(self)

Source from the content-addressed store, hash-verified

990 .save()
991
992 def delete(self):
993 """
994 Deletes the contents of a query
995 """
996 # validate where clause
997 partition_keys = set(x.db_field_name for x in self.model._partition_keys.values())
998 if partition_keys - set(c.field for c in self._where):
999 raise QueryException("The partition key must be defined on delete queries")
1000
1001 dq = DeleteStatement(
1002 self.column_family_name,
1003 where=self._where,
1004 timestamp=self._timestamp,
1005 conditionals=self._conditional,
1006 if_exists=self._if_exists
1007 )
1008 self._execute(dq)
1009
1010 def __eq__(self, q):
1011 if len(self._where) == len(q._where):

Callers

nothing calls this directly

Calls 5

_executeMethod · 0.95
DeleteStatementClass · 0.90
setFunction · 0.85
QueryExceptionClass · 0.85
valuesMethod · 0.45

Tested by

no test coverage detected