Menu

#30 fix string convert<const Blob&, string>(const Blob& value)

v0.4.0
accepted
Gulliver
Library (16)
7
2014-11-19
2012-08-07
Gulliver
No

Blob to string conversion was not working, modified the convert template
implementation in field.cpp to:
string convert<const blob&,="" string="">(const Blob& value)
{
if(value.isNull())
{
return "NULL";
}
else
{
string hexVal;
//hexVal.append("X'"); <--- not the correct syntax for litesql
hexVal.append(value.toHex());
//hexVal.append("'");
return hexVal;
}
}</const>

maybe the syntax is dependent on database type, user reports that code does not work on sqlite3.

Discussion

  • Gulliver

    Gulliver - 2014-02-21
    • assigned_to: Gulliver
    • Group: --> v0.4.0
     
  • Gulliver

    Gulliver - 2014-11-19
    • status: open --> accepted
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB