Thread: 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. > |
|
From: Artyom B. <art...@ya...> - 2013-06-02 13:33:45
|
the spelling corrections are more than welcome, about the error handling improvements, talk to me first. because such a changes should be backend wide... Also ABI compatibiliy is important I just don't want you to work on something that I would not except ------------------------------ On Sat, Jun 1, 2013 12:24 PM IDT Petr Janda wrote: >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. > |
|
From: Petr J. <ele...@ex...> - 2013-06-01 09:24:25
Attachments:
signature.asc
|
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. |