cppDb with sqlite3: blob data inserted as text instead of blob
Brought to you by:
artyom-beilis
When trying to insert blob data in sqlite3 throw cppDb, data is actually stored as text rather than blob. Changing the following code in sqlite3_backend.cpp seems to fix the issue, but I am not sure if there are side effects to this:
virtual void bind(int col,std::istream &v)
{
...
check_bind(sqlite3_bind_text(st_,col,tmp.c_str(),tmp.size(),SQLITE_TRANSIENT));
}
replaced with
check_bind(sqlite3_bind_blob(st_,col,tmp.c_str(),tmp.size(),SQLITE_TRANSIENT));
Anonymous