List:MySQL++« Previous MessageNext Message »
From:Joel Fielder Date:August 15 2007 10:02am
Subject:RE: SSQLSv2 design discussion
View as plain text  
Warren Young wrote:
> A side benefit of the new accessor feature is a solution to the auto
increment problem brought up recently by Graham Reitz.  Because data
members are
> hidden behind public member functions, we will know when a field has
been explicitly set ("id_is_set_ == true"), and when it retains its
> If it still retains its default and it is also marked as
auto_increment, we will know to leave it out when building an INSERT or
UPDATE query.

Continuing with the Boost theme as in the "Eyeball" thread, this is
boost::optional<T> again.

Also, the ability to apply some transform as the result set goes into
the SSQLS, e.g. localising a date.  Specifically, I wouldn't want to
have to reimplement the same transform in more than one SSQLS
constructor so it would need to be templatised so that I could pass a
LocaliseDate transformer when running the select query, with the
transformer having SQLStock operator()(mysqlpp::Row& row) function.

You can achieve a similar thing with make_transform_iterator, but the
benefit would be that the transform happens once on write rather than on
each read from the container, plus of course each set of client code
wouldn't need to do the same transform in multiple places.  You can
currently also use for_each to do it, but maybe there's a place for


SSQLSv2 design discussionWarren Young15 Aug
  • Re: SSQLSv2 design discussionChris Frey15 Aug
    • Re: SSQLSv2 design discussionWarren Young16 Aug
      • Re: SSQLSv2 design discussionChris Frey16 Aug
  • RE: SSQLSv2 design discussionJoel Fielder15 Aug
    • RE: SSQLSv2 design discussionJoel Fielder15 Aug
      • Re: SSQLSv2 design discussionWarren Young16 Aug
        • RE: SSQLSv2 design discussionJoel Fielder17 Aug
    • Re: SSQLSv2 design discussionWarren Young16 Aug