Remove db->escape in favor of sqlEscape.

This commit is contained in:
Arthur Britto
2013-01-06 02:08:54 -08:00
parent 04c17ac1f3
commit 8877501e5b
12 changed files with 45 additions and 80 deletions

View File

@@ -95,6 +95,7 @@ void HashedObjectStore::bulkWrite()
if (!SQL_EXISTS(db, boost::str(fExists % it->getHash().GetHex())))
{
char type;
switch(it->getType())
{
case hotLEDGER: type = 'L'; break;
@@ -103,9 +104,7 @@ void HashedObjectStore::bulkWrite()
case hotTRANSACTION_NODE: type = 'N'; break;
default: type = 'U';
}
std::string rawData;
db->escape(&(it->getData().front()), it->getData().size(), rawData);
db->executeSQL(boost::str(fAdd % it->getHash().GetHex() % type % it->getIndex() % rawData ));
db->executeSQL(boost::str(fAdd % it->getHash().GetHex() % type % it->getIndex() % sqlEscape(it->getData())));
}
}