On 29 January 2013 17:40, Pawel Aleksander Fedorynski <[email protected]> wrote: > into_as_raw_text() sounds good to me. The final decision belongs to > Mateusz.
Nah, we should get this as well as other similar things agreed collaboratively, as a team :) Let's summarise things up, so I'm clear about the idea: 1. into(sink) stores a value fetched from query results in the sink 2. into(sink) has some capacity to perform value type to sink type conversion, sort of a type promotion triggered by the difference between value type and sink type. 3. into(sink) has no capacity to perform advanced explicit conversions if distance between value type and sink type is significant. We don't want to equip the existing into(sink) machinery with advanced conversion ability because it would easily conflict with the implicit type promotion that's already there. So, we need a new tool. I guess, don't need a tool capable to perform any value type to any sink type conversion, but any value type to text is sufficient. Thus, we're gonna have single into_xxx(std::string) utility. Am I getting it? The sink type is hard-wired std::string, right? Regarding name, I don't have a clear winner candidate, but I guess that it should suggest it's related to into(): Obviously, there is lots of variants to consider: into_as_raw_text() into_as_text() into_as_raw() into_raw() into_text() into_to_string() into_convert() I'd also consider name aligned with the C++11 converter std::to_string into_to_string() Shall we worry about choosing shorter name, otherwise users may start complaining, their sql<< lines get terribly long :) Best regards, -- Mateusz Loskot, http://mateusz.loskot.net ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_jan _______________________________________________ soci-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/soci-users
