incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <jbel...@gmail.com>
Subject Re: How to insert a row with a TimeUUIDType column in C++
Date Fri, 23 Apr 2010 13:30:19 GMT
I would assume that you'd want to look for a C++ library that deals
with UUIDs.  Cassandra or Thrift aren't in the business of doing that
conversion.

On Fri, Apr 23, 2010 at 4:59 AM, Olivier Rosello <orosello@corp.free.fr> wrote:
> Here is my test code :
>
> ColumnPath new_col;
> new_col.__isset.column = true; /* this is required! */
> new_col.column_family.assign("Incoming");
> new_col.column.assign("1968ec4a-2a73-11df-9aca-00012e27a270");
> client.insert("MyKeyspace", "somekey", new_col, "Random Value", time(NULL), ONE);
>
> I didn't found in the C++ Cassandra/Thrift API how to specify TimeUUID bytes (16) to
the column name. The ColumnPath type get only a string field for the name "column".
>
> With a String like this example shows, the TimeUUID is a 36 chars String and this code
throws a Exception "UUIDs must be exactly 16 bytes".
>
> I didn't found a function like "client.insert_timeuuid_column" which convert the column
name to an uint8_t[16]... or anything else which could help me.
>
> Cheers,
>
> Olivier
>
>
>
> --
> Olivier
>
>
>

Mime
View raw message