incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaron morton <aa...@thelastpickle.com>
Subject Re: Returning A Generated Id From An Insert
Date Thu, 28 Mar 2013 02:46:20 GMT
>> Is it possible to do something similar with CQL (e.g. could I be
>> returned the generated timeuuid from
>> now() somehow?)
No.
Writes to not read, and the state of the row after your write may or may not be one include
all of the columns your write included. 

Cheers

-----------------
Aaron Morton
Freelance Cassandra Consultant
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 27/03/2013, at 8:56 AM, "Hiller, Dean" <Dean.Hiller@nrel.gov> wrote:

> Not really but things like PlayOrm generate your id for you and set your
> id when you have @NoSqlId (that is, if you are in java).
> 
> Later,
> Dean
> 
> On 3/26/13 1:42 PM, "Gareth Collins" <gareth.o.collins@gmail.com> wrote:
> 
>> Hi,
>> 
>> I have a question on if I could do something in Cassandra similar to
>> what I can do in SQL.
>> 
>> In SQL (e.g. SQL Server), if I have a generated primary key, I can get
>> the generated primary key
>> back as a result for the insert statement.
>> 
>> Is it possible to do something similar with CQL (e.g. could I be
>> returned the generated timeuuid from
>> now() somehow?). It certainly makes my client code cleaner if this
>> were possible (it is a "nice to have").
>> 
>> thanks in advance,
>> Gareth
> 


Mime
View raw message