This commit is contained in:
jed
2011-10-26 16:10:43 -07:00
parent fed4350ccc
commit 880c763dea
31 changed files with 1012 additions and 35 deletions

View File

@@ -0,0 +1,23 @@
#include "SqliteDatabase.h"
SqliteDatabase::SqliteDatabase()
{
}
/* http://www.sqlite.org/lang_expr.html
BLOB literals are string literals containing hexadecimal data and preceded by a single "x" or "X" character. For example:
X'53514C697465'
*/
void SqliteDatabase::escape(unsigned char* start,int size,std::string& retStr)
{
retStr.clear();
char buf[3];
retStr.append("X'");
for(int n=0; n<size; n++)
{
retStr.append( itoa(*start,buf,16) );
}
retStr.push_back('\'');
}