[Libpqxx-general] Dealing with resultsets that include user-defined-types
Jeroen Vermeulen
jtv at xs4all.nl
Mon May 25 07:36:44 UTC 2009
Maurice Gittens wrote:
> Based on the recipe you provided, I tried implementing support for using a
> user defined type as:
>
> my_udt o = resultset[0][0].as<my_udt>();
> and it all worked without any noteworthy incidents; with the possible
> exception that I think I needed to implement the above
> in the pqxx namespace to avoid compile errors IIRC.
Glad to hear it! Thanks for the feedback.
Yes, the traits class needs to be in the pqxx namespace. It seems
unlikely that it'll never clash with anyone else's classes otherwise. :-)
Jeroen
More information about the Libpqxx-general
mailing list