示例#1
0
 def test_selection(self):
     condition = eq('name', 'foo')
     selection = Columns('first', 'last')
     op = (Delete(
         self.column_family).columns(*selection.args).where(condition))
     cql, args = op.statement()
     self.assertEquals(cql, self.get_query(condition, selection))
     self.assertEquals(args, condition.values + selection.values)
示例#2
0
 def delete_from(column_family, keyspace=None):
     return Delete(column_family, keyspace)
示例#3
0
 def test_no_condition(self):
     op = Delete(self.column_family)
     self.assertRaises(ValidationError, op.statement)