Support bulk writes.

This commit is contained in:
JoelKatz
2012-06-22 00:41:28 -07:00
parent d7fa4d17cd
commit 14a51421c9
2 changed files with 33 additions and 7 deletions

View File

@@ -119,4 +119,14 @@ HashedObject::pointer HashedObject::retrieve(const uint256& hash)
return obj;
}
HashedObjectBulkWriter::HashedObjectBulkWriter() : sl(theApp->getHashNodeDB()->getDBLock())
{
theApp->getHashNodeDB()->getDB()->executeSQL("BEGIN TRANSACTION;");
}
HashedObjectBulkWriter::~HashedObjectBulkWriter()
{
theApp->getHashNodeDB()->getDB()->executeSQL("END TRANSACTION;");
}
// vim:ts=4