diff options
| author | Josh Ferrell <josh@vector35.com> | 2023-06-29 19:08:01 -0400 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2023-06-29 19:08:01 -0400 |
| commit | 94e476e947cf4cb0734fbd0563286e8443c75b96 (patch) | |
| tree | 736fdf509f623a17a9ea80fdaab68cbf20ab5d45 /database.cpp | |
| parent | e8d6feb5e0b2f8201e06c3cbd5c25194829761d8 (diff) | |
Pass KeyValueStore ValueHash through the API
Diffstat (limited to 'database.cpp')
| -rw-r--r-- | database.cpp | 11 |
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()); |
