Sorry, my bad! These are 2 functions I added to the library myself. ;) (It was a year
ago when I did that, should have marked them as such!)
Maybe they are usefull for addition to the library? Here they are:
const enum_field_types sql_type() const { return deref().base_type_; }
bool is_num_type() const { return IS_NUM(sql_type()); }
But never the less, maybe there is a better way of coding with the functions available in
the library, what I want to do with the code below?
Met vriendelijke groet / Best regards,
Wilfred van Velzen
>>> On 2010/08/10 at 19:38, "Wilfred van Velzen" <w.v.velzen@stripped>
> wrote:
Hi
In my project using 3.0.9, I had a piece of code that looked like this:
const mysqlpp::String &str = row[x];
std::string stdstring;
if ( str.type().sql_type() == MYSQL_TYPE_DATE
|| str.type().is_num_type())
stdstring = str.is_null() ? "0" : (const char *)str;
else
stdstring = str.is_null() ? "" : (const char *)str;
In 3.1.0 sql_type() and is_num_type() are gone... How do I accomplish the same thing in
3.1.0 ?
--
SERCOM Regeltechniek B.V.
Heereweg 9
2161 AB Lisse
Nederland
+31 (0)252 416530 (voice)
+31 (0)252 419481 (fax)
<http://www.sercom.nl/>
Op al onze offertes, op alle opdrachten aan ons en op alle met ons gesloten
overeenkomsten zijn toepasselijk de METAALUNIEVOORWAARDEN, gedeponeerd ter
Griffie van de Rechtbank te Rotterdam, zoals deze luiden volgens de
laatstelijk aldaar neergelegde tekst. De leveringsvoorwaarden worden u op
verzoek toegezonden.
---