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:
parent
1c83b840f0
commit
1edeb655a6
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user