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

@@ -235,9 +235,8 @@ std::string SerializedTransaction::getMetaSQL(uint32 inLedger, const std::string
std::string SerializedTransaction::getSQL(Serializer rawTxn, uint32 inLedger, char status) const
{
static boost::format bfTrans("('%s', '%s', '%s', '%d', '%d', '%c', %s)");
std::string rTxn;
theApp->getTxnDB()->getDB()->escape(
reinterpret_cast<const unsigned char *>(rawTxn.getDataPtr()), rawTxn.getLength(), rTxn);
std::string rTxn = sqlEscape(rawTxn.peekData());
return str(bfTrans
% getTransactionID().GetHex() % getTransactionType() % getSourceAccount().humanAccountID()
% getSequence() % inLedger % status % rTxn);
@@ -247,9 +246,8 @@ std::string SerializedTransaction::getMetaSQL(Serializer rawTxn, uint32 inLedger
const std::string& escapedMetaData) const
{
static boost::format bfTrans("('%s', '%s', '%s', '%d', '%d', '%c', %s, %s)");
std::string rTxn;
theApp->getTxnDB()->getDB()->escape(
reinterpret_cast<const unsigned char *>(rawTxn.getDataPtr()), rawTxn.getLength(), rTxn);
std::string rTxn = sqlEscape(rawTxn.peekData());
return str(bfTrans
% getTransactionID().GetHex() % getTransactionType() % getSourceAccount().humanAccountID()
% getSequence() % inLedger % status % rTxn % escapedMetaData);