diff options
author | Wouter Bolsterlee <uws@xs4all.nl> | 2013-11-03 16:54:28 +0100 |
---|---|---|
committer | Wouter Bolsterlee <uws@xs4all.nl> | 2013-11-03 16:54:28 +0100 |
commit | d8130916c61d6fa295930739f1bbee4e964a7353 (patch) | |
tree | a5f33643b429d07e4f57e557adb1635c88ff2c4c /happybase/table.py | |
parent | d7fc7502d0ecd57a263440a5d377bdc7b4bf4446 (diff) | |
download | happybase-d8130916c61d6fa295930739f1bbee4e964a7353.tar.gz |
Always delegate deletion to the Batch class
This eliminates the use of the .deleteAllRow() and .deleteAllRowTs()
Thrift API, both of which do not support flags to influence the WAL
behaviour.
Diffstat (limited to 'happybase/table.py')
-rw-r--r-- | happybase/table.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/happybase/table.py b/happybase/table.py index 4a1db2e..2ff046a 100644 --- a/happybase/table.py +++ b/happybase/table.py @@ -382,15 +382,8 @@ class Table(object): :param list_or_tuple columns: list of columns (optional) :param int timestamp: timestamp (optional) """ - if columns is None: - if timestamp is None: - self.connection.client.deleteAllRow(self.name, row, {}) - else: - self.connection.client.deleteAllRowTs( - self.name, row, timestamp, {}) - else: - with self.batch(timestamp=timestamp) as batch: - batch.delete(row, columns) + with self.batch(timestamp=timestamp) as batch: + batch.delete(row, columns) def batch(self, timestamp=None, batch_size=None, transaction=False): """Create a new batch operation for this table. |