summaryrefslogtreecommitdiff
path: root/database.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'database.cpp')
-rw-r--r--database.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/database.cpp b/database.cpp
index dd258967..33f22714 100644
--- a/database.cpp
+++ b/database.cpp
@@ -86,6 +86,17 @@ Json::Value KeyValueStore::GetValue(const std::string& name) const
}
+DataBuffer KeyValueStore::GetValueHash(const std::string& name) const
+{
+ BNDataBuffer* buffer = BNGetKeyValueStoreValueHash(m_object, name.c_str());
+ if (buffer == nullptr)
+ {
+ throw DatabaseException("Unknown key");
+ }
+ return DataBuffer(buffer);
+}
+
+
DataBuffer KeyValueStore::GetBuffer(const std::string& name) const
{
BNDataBuffer* buffer = BNGetKeyValueStoreBuffer(m_object, name.c_str());