memgraph/transactions/transaction.hpp
2015-11-21 19:16:19 +01:00

29 lines
480 B
C++

#pragma once
#include <cstdlib>
#include <cstdint>
#include <vector>
#include "mvcc/id.hpp"
#include "snapshot.hpp"
namespace tx
{
struct Transaction
{
Transaction(const Id& id, Snapshot<Id> snapshot)
: id(id), cid(1), snapshot(std::move(snapshot)) {}
// index of this transaction
Id id;
// index of the current command in the current transaction;
uint8_t cid;
// a snapshot of currently active transactions
Snapshot<Id> snapshot;
};
}