@@ -217,48 +217,12 @@ def delete(self):
217217 """
218218 self ._delete (state = None )
219219
220- def delete_cell (self , column_family_id , column , time_range = None ,
221- state = None ):
222- """Deletes cell in this row.
223-
224- .. note::
225-
226- This method adds a mutation to the accumulated mutations on this
227- :class:`Row`, but does not make an API request. To actually
228- send an API request (with the mutations) to the Google Cloud
229- Bigtable API, call :meth:`commit`.
230-
231- :type column_family_id: str
232- :param column_family_id: The column family that contains the column
233- or columns with cells being deleted. Must be
234- of the form ``[_a-zA-Z0-9][-_.a-zA-Z0-9]*``.
235-
236- :type column: bytes
237- :param column: The column within the column family that will have a
238- cell deleted.
239-
240- :type time_range: :class:`TimestampRange`
241- :param time_range: (Optional) The range of time within which cells
242- should be deleted.
243-
244- :type state: bool
245- :param state: (Optional) The state that the mutation should be
246- applied in. Unset if the mutation is not conditional,
247- otherwise :data:`True` or :data:`False`.
248- """
249- self .delete_cells (column_family_id , [column ], time_range = time_range ,
250- state = state )
251-
252- def delete_cells (self , column_family_id , columns , time_range = None ,
253- state = None ):
254- """Deletes cells in this row.
255-
256- .. note::
220+ def _delete_cells (self , column_family_id , columns , time_range = None ,
221+ state = None ):
222+ """Helper for :meth:`delete_cell` and :meth:`delete_cells`.
257223
258- This method adds a mutation to the accumulated mutations on this
259- :class:`Row`, but does not make an API request. To actually
260- send an API request (with the mutations) to the Google Cloud
261- Bigtable API, call :meth:`commit`.
224+ ``state`` is unused by :class:`DirectRow` but is used by
225+ subclasses.
262226
263227 :type column_family_id: str
264228 :param column_family_id: The column family that contains the column
@@ -268,17 +232,16 @@ def delete_cells(self, column_family_id, columns, time_range=None,
268232 :type columns: :class:`list` of :class:`str` /
269233 :func:`unicode <unicode>`, or :class:`object`
270234 :param columns: The columns within the column family that will have
271- cells deleted. If :attr:`Row. ALL_COLUMNS` is used then
235+ cells deleted. If :attr:`ALL_COLUMNS` is used then
272236 the entire column family will be deleted from the row.
273237
274238 :type time_range: :class:`TimestampRange`
275239 :param time_range: (Optional) The range of time within which cells
276240 should be deleted.
277241
278242 :type state: bool
279- :param state: (Optional) The state that the mutation should be
280- applied in. Unset if the mutation is not conditional,
281- otherwise :data:`True` or :data:`False`.
243+ :param state: (Optional) The state that is passed along to
244+ :meth:`_get_mutations`.
282245 """
283246 mutations_list = self ._get_mutations (state )
284247 if columns is self .ALL_COLUMNS :
@@ -311,6 +274,60 @@ def delete_cells(self, column_family_id, columns, time_range=None,
311274 # processed without error.
312275 mutations_list .extend (to_append )
313276
277+ def delete_cell (self , column_family_id , column , time_range = None ):
278+ """Deletes cell in this row.
279+
280+ .. note::
281+
282+ This method adds a mutation to the accumulated mutations on this
283+ row, but does not make an API request. To actually
284+ send an API request (with the mutations) to the Google Cloud
285+ Bigtable API, call :meth:`commit`.
286+
287+ :type column_family_id: str
288+ :param column_family_id: The column family that contains the column
289+ or columns with cells being deleted. Must be
290+ of the form ``[_a-zA-Z0-9][-_.a-zA-Z0-9]*``.
291+
292+ :type column: bytes
293+ :param column: The column within the column family that will have a
294+ cell deleted.
295+
296+ :type time_range: :class:`TimestampRange`
297+ :param time_range: (Optional) The range of time within which cells
298+ should be deleted.
299+ """
300+ self ._delete_cells (column_family_id , [column ], time_range = time_range ,
301+ state = None )
302+
303+ def delete_cells (self , column_family_id , columns , time_range = None ):
304+ """Deletes cells in this row.
305+
306+ .. note::
307+
308+ This method adds a mutation to the accumulated mutations on this
309+ row, but does not make an API request. To actually
310+ send an API request (with the mutations) to the Google Cloud
311+ Bigtable API, call :meth:`commit`.
312+
313+ :type column_family_id: str
314+ :param column_family_id: The column family that contains the column
315+ or columns with cells being deleted. Must be
316+ of the form ``[_a-zA-Z0-9][-_.a-zA-Z0-9]*``.
317+
318+ :type columns: :class:`list` of :class:`str` /
319+ :func:`unicode <unicode>`, or :class:`object`
320+ :param columns: The columns within the column family that will have
321+ cells deleted. If :attr:`ALL_COLUMNS` is used then
322+ the entire column family will be deleted from the row.
323+
324+ :type time_range: :class:`TimestampRange`
325+ :param time_range: (Optional) The range of time within which cells
326+ should be deleted.
327+ """
328+ self ._delete_cells (column_family_id , columns , time_range = time_range ,
329+ state = None )
330+
314331 def commit (self ):
315332 """Makes a ``MutateRow`` API request.
316333
@@ -518,6 +535,70 @@ def delete(self, state=True):
518535 applied in. Defaults to :data:`True`.
519536 """
520537 self ._delete (state = state )
538+
539+ def delete_cell (self , column_family_id , column , time_range = None ,
540+ state = True ):
541+ """Deletes cell in this row.
542+
543+ .. note::
544+
545+ This method adds a mutation to the accumulated mutations on this
546+ row, but does not make an API request. To actually
547+ send an API request (with the mutations) to the Google Cloud
548+ Bigtable API, call :meth:`commit`.
549+
550+ :type column_family_id: str
551+ :param column_family_id: The column family that contains the column
552+ or columns with cells being deleted. Must be
553+ of the form ``[_a-zA-Z0-9][-_.a-zA-Z0-9]*``.
554+
555+ :type column: bytes
556+ :param column: The column within the column family that will have a
557+ cell deleted.
558+
559+ :type time_range: :class:`TimestampRange`
560+ :param time_range: (Optional) The range of time within which cells
561+ should be deleted.
562+
563+ :type state: bool
564+ :param state: (Optional) The state that the mutation should be
565+ applied in. Defaults to :data:`True`.
566+ """
567+ self ._delete_cells (column_family_id , [column ], time_range = time_range ,
568+ state = state )
569+
570+ def delete_cells (self , column_family_id , columns , time_range = None ,
571+ state = True ):
572+ """Deletes cells in this row.
573+
574+ .. note::
575+
576+ This method adds a mutation to the accumulated mutations on this
577+ row, but does not make an API request. To actually
578+ send an API request (with the mutations) to the Google Cloud
579+ Bigtable API, call :meth:`commit`.
580+
581+ :type column_family_id: str
582+ :param column_family_id: The column family that contains the column
583+ or columns with cells being deleted. Must be
584+ of the form ``[_a-zA-Z0-9][-_.a-zA-Z0-9]*``.
585+
586+ :type columns: :class:`list` of :class:`str` /
587+ :func:`unicode <unicode>`, or :class:`object`
588+ :param columns: The columns within the column family that will have
589+ cells deleted. If :attr:`Row.ALL_COLUMNS` is used then
590+ the entire column family will be deleted from the row.
591+
592+ :type time_range: :class:`TimestampRange`
593+ :param time_range: (Optional) The range of time within which cells
594+ should be deleted.
595+
596+ :type state: bool
597+ :param state: (Optional) The state that the mutation should be
598+ applied in. Defaults to :data:`True`.
599+ """
600+ self ._delete_cells (column_family_id , columns , time_range = time_range ,
601+ state = state )
521602 # pylint: enable=arguments-differ
522603
523604 def clear (self ):
0 commit comments