Add sqlEscape to utils.h.

This commit is contained in:
Arthur Britto
2012-06-15 16:09:33 -07:00
parent 347b903393
commit 3ea3feb1c1

View File

@@ -82,6 +82,11 @@ inline std::string strHex(const uint64 uiHost)
return strHex((unsigned char*) &uBig, sizeof(uBig));
}
inline static std::string sqlEscape(const std::string& strSrc)
{
return str(boost::format("X'%s'") % strHex(strSrc));
}
template<class Iterator>
bool isZero(Iterator first, int iSize)
{