def delete(self):
        """ Deletes one instance """
        if self.instance is None:
            raise CQLEngineException("DML Query instance attribute is None")

        ds = DeleteStatement(self.column_family_name, timestamp=self._timestamp)
        for name, col in self.model._primary_keys.items():
            if (not col.partition_key) and (getattr(self.instance, name) is None): continue
            ds.add_where_clause(WhereClause(
                col.db_field_name,
                EqualsOperator(),
                col.to_database(getattr(self.instance, name))
            ))
        self._execute(ds)
def delete ( self ) : if self . instance is None : raise CQLEngineException ( "DML Query instance attribute is None" ) ds = DeleteStatement ( self . column_family_name , timestamp = self . _timestamp ) for name , col in self . model . _primary_keys . items ( ) : if ( not col . partition_key ) and ( getattr ( self . instance , name ) is None ) : continue ds . add_where_clause ( WhereClause ( col . db_field_name , EqualsOperator ( ) , col . to_database ( getattr ( self . instance , name ) ) ) ) self . _execute ( ds )
Deletes one instance