You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by shiwei ye <ye...@gmail.com> on 2010/10/14 13:53:39 UTC

how to CompareWith LongType

How to insert a value to a column family CompareWith Longtype in python.I'm
using pycassa.
What should the type of the column be?Thx

Re: how to CompareWith LongType

Posted by Gary Dusbabek <gd...@gmail.com>.
Pycassa should just take your long and do the right thing with it
(packing it into a binary string) before passing it off to thrift.

The system tests in the source (test/system/test_thrift_server.py)
will give you a very good indication of how to do this.  The long is
packed into a string using struct.pack('>p', n), where 'n' is your
long.


On Thu, Oct 14, 2010 at 06:53, shiwei ye <ye...@gmail.com> wrote:
> How to insert a value to a column family CompareWith Longtype in python.I'm
> using pycassa.
> What should the type of the column be?Thx
>
>