Re: [Cppcms-users] cppdb::statement::exec() should be able to return result
Brought to you by:
artyom-beilis
|
From: Petr J. <ele...@ex...> - 2013-06-01 09:24:25
|
Cheers, I actually started writing a new function called statement::exec_wr() (exec with result), when I received your reply, but it seems it's not necessary now. I might spend some time doing some minor improvements to cppdb - mostly spelling corrections, better error handling. Would you be interested? Petr On 1/06/2013 5:58 PM, Artyom Beilis wrote: > > > > 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. >> > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite > It's a free troubleshooting tool designed for production > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap2 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > -- Please use PGP to encrypt your email to ensure our privacy is respected. |