hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
temporary_wsv.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_TEMPORARYWSV_HPP
7 #define IROHA_TEMPORARYWSV_HPP
8 
9 #include <functional>
10 
11 #include "common/result.hpp"
13 
14 namespace shared_model {
15  namespace interface {
16  class Transaction;
17  } // namespace interface
18 } // namespace shared_model
19 
20 namespace iroha {
21  namespace ametsuchi {
22 
27  class TemporaryWsv {
28  public:
37  virtual void release() = 0;
38 
39  virtual ~SavepointWrapper() = default;
40  };
41 
47  virtual expected::Result<void, validation::CommandError> apply(
48  const shared_model::interface::Transaction &transaction) = 0;
49 
55  virtual std::unique_ptr<TemporaryWsv::SavepointWrapper> createSavepoint(
56  const std::string &name) = 0;
57 
58  virtual ~TemporaryWsv() = default;
59  };
60  } // namespace ametsuchi
61 } // namespace iroha
62 
63 #endif // IROHA_TEMPORARYWSV_HPP
decltype(auto) constexpr apply(Tuple &&t, F &&f)
apply F to Tuple
Definition: soci_utils.hpp:72
Definition: temporary_wsv.hpp:27
Definition: block_query.hpp:16
Definition: temporary_wsv.hpp:33
Definition: command_executor.hpp:12
Definition: transaction.hpp:22