6 #ifndef IROHA_POSTGRES_COMMAND_EXECUTOR_HPP 7 #define IROHA_POSTGRES_COMMAND_EXECUTOR_HPP 21 class AddAssetQuantity;
25 class CompareAndSetAccountDetail;
32 class GrantPermission;
33 class PermissionToString;
35 class RemoveSignatory;
36 class RevokePermission;
37 class SetAccountDetail;
39 class SubtractAssetQuantity;
41 class SetSettingValue;
48 class PostgresSpecificQueryExecutor;
54 std::unique_ptr<soci::session> sql,
55 std::shared_ptr<shared_model::interface::PermissionToString>
57 std::shared_ptr<PostgresSpecificQueryExecutor>
58 specific_query_executor,
59 std::optional<std::reference_wrapper<const VmCaller>> vm_caller);
67 const std::string &tx_hash,
69 bool do_validation)
override;
71 void skipChanges()
override;
75 soci::session &getSession();
81 const std::string &tx_hash,
89 const std::string &tx_hash,
97 const std::string &tx_hash,
105 const std::string &tx_hash,
113 const std::string &tx_hash,
121 const std::string &tx_hash,
129 const std::string &tx_hash,
137 const std::string &tx_hash,
145 const std::string &tx_hash,
153 const std::string &tx_hash,
161 const std::string &tx_hash,
169 const std::string &tx_hash,
177 const std::string &tx_hash,
185 const std::string &tx_hash,
193 const std::string &tx_hash,
201 const std::string &tx_hash,
209 const std::string &tx_hash,
217 const std::string &tx_hash,
225 const std::string &tx_hash,
241 void initStatements();
243 std::unique_ptr<CommandStatements> makeCommandStatements(
244 const std::unique_ptr<soci::session> &session,
245 const std::string &base_statement,
246 const std::vector<std::string> &permission_checks);
248 std::unique_ptr<soci::session> sql_;
251 std::shared_ptr<shared_model::interface::PermissionToString>
253 std::shared_ptr<PostgresSpecificQueryExecutor> specific_query_executor_;
254 std::optional<std::reference_wrapper<const VmCaller>> vm_caller_;
256 std::unique_ptr<CommandStatements> add_asset_quantity_statements_;
257 std::unique_ptr<CommandStatements> add_peer_statements_;
258 std::unique_ptr<CommandStatements> add_signatory_statements_;
259 std::unique_ptr<CommandStatements> append_role_statements_;
260 std::unique_ptr<CommandStatements>
261 compare_and_set_account_detail_statements_;
262 std::unique_ptr<CommandStatements> create_account_statements_;
263 std::unique_ptr<CommandStatements> create_asset_statements_;
264 std::unique_ptr<CommandStatements> create_domain_statements_;
265 std::unique_ptr<CommandStatements> create_role_statements_;
266 std::unique_ptr<CommandStatements> detach_role_statements_;
267 std::unique_ptr<CommandStatements> grant_permission_statements_;
268 std::unique_ptr<CommandStatements> remove_peer_statements_;
269 std::unique_ptr<CommandStatements> remove_signatory_statements_;
270 std::unique_ptr<CommandStatements> revoke_permission_statements_;
271 std::unique_ptr<CommandStatements> set_account_detail_statements_;
272 std::unique_ptr<CommandStatements> set_quorum_statements_;
273 std::unique_ptr<CommandStatements> store_engine_response_statements_;
274 std::unique_ptr<CommandStatements> subtract_asset_quantity_statements_;
275 std::unique_ptr<CommandStatements> transfer_asset_statements_;
276 std::unique_ptr<CommandStatements> set_setting_value_statements_;
281 #endif // IROHA_POSTGRES_COMMAND_EXECUTOR_HPP Definition: compare_and_set_account_detail.hpp:21
Definition: add_signatory.hpp:19
Definition: block_query.hpp:17
Definition: set_quorum.hpp:18
Definition: subtract_asset_quantity.hpp:20
Definition: set_setting_value.hpp:19
Definition: result_fwd.hpp:27
Definition: postgres_command_executor.cpp:389
Definition: detach_role.hpp:19
Definition: remove_signatory.hpp:18
Definition: create_asset.hpp:18
Definition: postgres_command_executor.cpp:350
Definition: call_engine.hpp:20
Definition: remove_peer.hpp:19
Definition: append_role.hpp:19
Definition: transfer_asset.hpp:19
Definition: block_query.hpp:15
Definition: postgres_command_executor.hpp:51
std::string AccountIdType
Type of account id.
Definition: types.hpp:38
Definition: command_executor.hpp:48
Definition: create_domain.hpp:18
Definition: create_account.hpp:19
WsvCommandResult execute(soci::statement &st, Function &&error)
Definition: postgres_wsv_command.cpp:26
Definition: grant_permission.hpp:19
Definition: set_account_detail.hpp:19
Definition: db_transaction.hpp:13
Definition: revoke_permission.hpp:19
Definition: command.hpp:41
int32_t CommandIndexType
Type of command index within a transaction.
Definition: types.hpp:100
Definition: add_asset_quantity.hpp:20
Definition: create_role.hpp:19
Definition: command_executor.hpp:13
Definition: pool_wrapper.hpp:11
Definition: add_peer.hpp:20
Definition: postgres_db_transaction.hpp:15