Browse files

Add docstring info about batch counter increments

Fixes #129
  • Loading branch information...
1 parent b9110f2 commit 1fc6e2fbfc3eb5580bbc94cefa060555b2e3da7e @thobbs thobbs committed May 29, 2012
Showing with 6 additions and 1 deletion.
  1. +3 −0 pycassa/batch.py
  2. +3 −1 pycassa/columnfamily.py
View
3 pycassa/batch.py
@@ -137,6 +137,9 @@ def insert(self, column_family, key, columns, timestamp=None, ttl=None):
`column_family` is the :class:`~pycassa.columnfamily.ColumnFamily`
that the insert will be executed on.
+ If this is used on a counter column family, integers may be used for
+ column values, and they will be taken as counter adjustments.
+
"""
if columns:
if timestamp is None:
View
4 pycassa/columnfamily.py
@@ -921,7 +921,9 @@ def insert(self, key, columns, timestamp=None, ttl=None,
or update. If this is a standard column family, `columns` should
look like ``{column_name: column_value}``. If this is a super
column family, `columns` should look like
- ``{super_column_name: {sub_column_name: value}}``
+ ``{super_column_name: {sub_column_name: value}}``. If this is a
+ counter column family, you may use integers as values and those will
+ be used as counter adjustments.
A timestamp may be supplied for all inserted columns with `timestamp`.

0 comments on commit 1fc6e2f

Please sign in to comment.