[Libpqxx-general] Unnamed prepared statements vs PQexecParams

Trigve Siver trigves at yahoo.com
Wed Oct 14 20:39:31 UTC 2009


> From: Jeroen T. Vermeulen <jtv at xs4all.nl>

> To: Trigve Siver <trigves at yahoo.com>
> Cc: libpqxx-general at pgfoundry.org
> Sent: Sat, October 10, 2009 7:37:08 PM
> Subject: Re: [Libpqxx-general] Unnamed prepared statements vs PQexecParams
> 
> > I think this could be solved to by implementing PQexecParams
> > (pqxx::prepare::invocation-style API would be fine) inside transaction
> > class. I can handle this task if there will be interface specified and so.
> > Second workaround could be to add some functions to pqxx transaction
> > classes for creating ONLY unnamed prepared statements.
> 
> I'd be very pleased if you have time to work on that.  The API would have
> to reuse as much as possible from the prepared-statements API; ideally the
> only difference would be a different "exec" function that takes a query
> instead of a prepared-statement name.  Coming up with a clean, elegant
> solution for that may be hard though.

Hi Jeroen,
so I've implemented the API. I've created new class param_invocation which I think could be used as base class for prepare::invocation because it is the same cope somehow stripped. So please review the patch and let me know if something is wrong.

> 
> Jeroen

Thanks,

Trigve



      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exec_params.patch
Type: application/octet-stream
Size: 7987 bytes
Desc: not available
URL: <http://pgfoundry.org/pipermail/libpqxx-general/attachments/20091014/a63a1854/attachment.obj>


More information about the Libpqxx-general mailing list