Slight refactor of the boundary between the node db and its backend(s).

This commit is contained in:
JoelKatz
2013-07-13 15:15:09 -07:00
parent 14374bdb3a
commit 2ce293ec85
5 changed files with 87 additions and 115 deletions

View File

@@ -33,14 +33,6 @@ public:
return mName;
}
bool store (NodeObject::ref obj)
{
Blob blob (toBlob (obj));
return mDB->Put (leveldb::WriteOptions (),
leveldb::Slice (reinterpret_cast<char const*>(obj->getHash ().begin ()), 256 / 8),
leveldb::Slice (reinterpret_cast<char const*>(&blob.front ()), blob.size ())).ok ();
}
bool bulkStore (const std::vector< NodeObject::pointer >& objs)
{
leveldb::WriteBatch batch;