Fix NodeObject retrieve in KeyvaDB backend

This commit is contained in:
Vinnie Falco
2013-07-17 12:47:40 -07:00
parent a84c3debf5
commit 3a85ad04d3

View File

@@ -33,19 +33,17 @@ public:
return m_path.toStdString ();
}
void writeObject (NodeObject const& object)
void writeObject (NodeObject::ref object)
{
m_db->put (
object.getHash ().begin (),
&object.getData () [0],
object.getData ().size ());
Blob blob (toBlob (object));
m_db->put (object->getHash ().begin (), &blob [0], blob.size ());
}
bool bulkStore (std::vector <NodeObject::pointer> const& objs)
{
for (size_t i = 0; i < objs.size (); ++i)
{
writeObject (*objs [i]);
writeObject (objs [i]);
}
return true;