diff --git a/src/storage/record_accessor.cpp b/src/storage/record_accessor.cpp index 7c9cdcb6b..3d04f7a92 100644 --- a/src/storage/record_accessor.cpp +++ b/src/storage/record_accessor.cpp @@ -61,6 +61,23 @@ const uint64_t RecordAccessor::temporary_id() const { return (uint64_t) vlist_; } +template +RecordAccessor &RecordAccessor::SwitchNew() { + // TODO implement + return *this; +} + +template +RecordAccessor &RecordAccessor::SwitchOld() { + // TODO implement + return *this; +} + +template +void RecordAccessor::Reconstruct() { + // TODO implement +} + template TRecord &RecordAccessor::update() { db_accessor().update(*this); diff --git a/src/storage/record_accessor.hpp b/src/storage/record_accessor.hpp index 661e7706a..3e1b79cc8 100644 --- a/src/storage/record_accessor.hpp +++ b/src/storage/record_accessor.hpp @@ -148,6 +148,31 @@ class RecordAccessor { */ const uint64_t temporary_id() const; + /* + * Switches this record accessor to use the latest + * version (visible to the current transaction+command). + * + * @return A reference to this. + */ + RecordAccessor &SwitchNew(); + + /** + * Switches this record accessor to use the old + * (not updated) version visible to the current transaction+command. + * + * @return A reference to this. + */ + RecordAccessor &SwitchOld(); + + /** + * Reconstructs the internal state of the record + * accessor so it uses the versions appropriate + * to this transaction+command. + * + * TODO consider what it does after delete+advance_command + */ + void Reconstruct(); + protected: /** * Returns the update-ready version of the record.