예제 #1
0
void Binder::bind(std::size_t pos, const Poco::Data::BLOB& val)
{
	// convert a blob to a an unsigned char* array
	const unsigned char* pData = reinterpret_cast<const unsigned char*>(val.rawContent());
	int valSize = static_cast<int>(val.size());

	int rc = sqlite3_bind_blob(_pStmt, static_cast<int>(pos), pData, valSize, SQLITE_STATIC); // no deep copy, do not free memory
	checkReturn(rc);
}
예제 #2
0
void Binder::bind(std::size_t pos, const Poco::Data::BLOB& val, Direction dir)
{
    poco_assert(dir == PD_IN);
    realBind(pos, MYSQL_TYPE_BLOB, val.rawContent(), static_cast<int>(val.size()));
}