insert() will only overwrite (or insert) the columns that you supply in the
dictionary.  So, if you do:

  cf.insert('key', {'foo': 'bar'})

and the column 'foo' doesn't exist in that row yet, the column will simply
be added to the other columns in the row.

On Wed, Mar 16, 2011 at 9:00 PM, buddhasystem <potek...@bnl.gov> wrote:

> Hello Peter, thanks for the note.
>
> I'm not looking for anything fancy. It's just when I'm looking at the
> following bit of Pycassa docs, it's not 100% clear to me that it won't
> overwrite the entire row for the key, if I want to simply add an extra
> column {'foo':'bar'} to the already existing row. I don't care about
> cross-node consistency at this point.
>
> insert(key, columns[, timestamp][, ttl][, write_consistency_level])ΒΆ
>
>    Insert or update columns in the row with key key.
>
>    columns should be a dictionary of columns or super columns to insert 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}}
>
> --
> View this message in context:
> http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Is-column-update-column-atomic-or-row-atomic-tp6174445p6179492.html
> Sent from the cassandra-u...@incubator.apache.org mailing list archive at
> Nabble.com.
>



-- 
Tyler Hobbs
Software Engineer, DataStax <http://datastax.com/>
Maintainer of the pycassa <http://github.com/pycassa/pycassa> Cassandra
Python client library

Reply via email to