Hello,

 I've found another puzzle in the SOCI code: when you run an insert
statement with some use() parameters of some custom type for which
type_conversion<> is specialized, the values are correct converted to the
values of the "base" type, i.e. the type actually used at database level,
in standard_use_type::pre_use(). So far so good.

 However after the statement is executed, standard_use_type::post_use()
calls convert_from_base() to convert the values from the database type to
the custom type and this was totally unexpected to me. Arguably, it's not a
problem on its own but why on earth would SOCI need to do this? It just
seems absolutely wasteful and unnecessary. Or am I missing some case in
which it isn't?

 Can use() parameters actually be modified? I hope not but I've been
surprised by SOCI before...

 As usual, thanks in advance for any words of wisdom,
VZ

Attachment: pgplSrYyLhxvF.pgp
Description: PGP signature

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Soci-users mailing list
Soci-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to