Re: [Cppcms-users] cppdb::statement::exec() should be able to return result
Brought to you by:
artyom-beilis
|
From: Artyom B. <art...@ya...> - 2013-06-01 07:58:51
|
just use query. the only difference between query and exec is wheather the statement returns result artyom ------------------------------ On Sat, Jun 1, 2013 10:15 AM IDT Petr Janda wrote: >Hi Artyom, > >I'm using PostgreSQL and it has the option to return result from an >insert statement. Such as > >INSERT into table(...) values(...) RETURNING uuid > >In which case statement::exec() should be able to return result instead >of VOID. > >I don't think it's possible to use statement::sequence_last() because >the primary key for the table is not a named sequence (ie. serial data >type), but an UUID. > >Is there currently anyway to use this PostgreSQL feature, without having >to do a SELECT query following the INSERT to get the last created UUID? > >Cheers, > > >-- >Please use PGP to encrypt your email to ensure our privacy is respected. > |