Return PropertyValue from store by value

Summary: Do it so properties-on-disk can be implemented.

Reviewers: buda, dgleich

Reviewed By: dgleich

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1343
This commit is contained in:
florijan 2018-04-09 11:25:11 +02:00
parent 1c83b840f0
commit 1edeb655a6
3 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ class PropertyValueStore {
* @param key The key for which a PropertyValue is sought.
* @return See above.
*/
const PropertyValue &at(const Property &key) const {
PropertyValue at(const Property &key) const {
for (const auto &kv : props_)
if (kv.first == key) return kv.second;

View File

@ -20,7 +20,7 @@ RecordAccessor<TRecord>::RecordAccessor(AddressT address,
}
template <typename TRecord>
const PropertyValue &RecordAccessor<TRecord>::PropsAt(
PropertyValue RecordAccessor<TRecord>::PropsAt(
storage::Property key) const {
return current().properties_.at(key);
}

View File

@ -55,7 +55,7 @@ class RecordAccessor : public TotalOrdering<RecordAccessor<TRecord>> {
RecordAccessor &operator=(RecordAccessor &&other) = default;
/** Gets the property for the given key. */
const PropertyValue &PropsAt(storage::Property key) const;
PropertyValue PropsAt(storage::Property key) const;
/** Sets a value on the record for the given property. */
void PropsSet(storage::Property key, PropertyValue value);