Namespaces | |
| tx_cache_response_details | |
| tx_cache_status_responses | |
| The namespace contains concrete result types of transaction cache. | |
Typedefs | |
| using | CommandResult = expected::Result< void, CommandError > |
| using | CommitResult = iroha::expected::Result< std::shared_ptr< const iroha::LedgerState >, std::string > |
| using | QueryErrorType = shared_model::interface::QueryResponseFactory::ErrorQueryType |
| using | ErrorQueryResponse = shared_model::interface::ErrorQueryResponse |
| using | QueryErrorMessageType = ErrorQueryResponse::ErrorMessageType |
| using | QueryErrorCodeType = ErrorQueryResponse::ErrorCodeType |
| template<std::size_t N, typename T > | |
| using | element_t = typename boost::tuples::element< N, T >::type |
| tuple element type shortcut More... | |
| template<class Tuple1 , class Tuple2 > | |
| using | concat = decltype(concat_impl< Tuple1, Tuple2 >(std::make_index_sequence< length_v< std::decay_t< Tuple1 > >>{}, std::make_index_sequence< length_v< std::decay_t< Tuple2 > >>{})) |
| tuple with types from two given tuples More... | |
| using | QueryExecutorResult = std::unique_ptr< shared_model::interface::QueryResponse > |
| using | TxCacheStatusType = std::variant< tx_cache_status_responses::Committed, tx_cache_status_responses::Rejected, tx_cache_status_responses::Missing > |
| Sum type of all possible concrete responses from the tx cache. More... | |
| using | WsvError = std::string |
| using | WsvCommandResult = expected::Result< void, WsvError > |
Functions | |
| shared_model::interface::types::DomainIdType | getDomainFromName (const shared_model::interface::types::AccountIdType &account_id) |
| template<typename Function > | |
| WsvCommandResult | execute (soci::statement &st, Function &&error) |
| template<typename ParamType , typename Function > | |
| void | processSoci (soci::statement &st, soci::indicator &ind, ParamType &row, Function f) |
| template<class Tuple1 , class Tuple2 , std::size_t... Is, std::size_t... Js> | |
| auto | concat_impl (std::index_sequence< Is... >, std::index_sequence< Js... >) -> boost::tuple< element_t< Is, std::decay_t< Tuple1 >>..., element_t< Js, std::decay_t< Tuple2 >>... > |
| index sequence helper for concat More... | |
| template<typename F , std::size_t... Is> | |
| decltype(auto) constexpr | index_apply_impl (F &&f, std::index_sequence< Is... >) |
| index sequence helper for index_apply More... | |
| template<size_t N, typename F > | |
| decltype(auto) constexpr | index_apply (F &&f) |
| apply F to an integer sequence [0, N) More... | |
| template<typename Tuple , typename F > | |
| decltype(auto) constexpr | apply (Tuple &&t, F &&f) |
| apply F to Tuple More... | |
| template<typename R , typename T > | |
| constexpr auto | viewQuery (T &&t) |
| view first length_v<R> elements of T without copying More... | |
| template<typename R , typename T > | |
| constexpr auto | viewPermissions (T &&t) |
| view last length_v<R> elements of T without copying More... | |
| template<typename T > | |
| constexpr auto | rebind (T &&t) |
| map tuple<optional<Ts>...> to optional<tuple<Ts...>> More... | |
| template<typename C , typename T , typename F > | |
| auto | mapValues (T &t, F &&f) |
| template<typename C , typename T , typename F > | |
| boost::optional< C > | flatMapValues (T &t, F &&f) |
| template<typename R , typename T , typename F > | |
| auto | flatMapValue (T &t, F &&f) |
| bool | isAlreadyProcessed (const TxCacheStatusType &tx_status) noexcept |
| tx_cache_response_details::HashType | getHash (const TxCacheStatusType &status) noexcept |
Variables | |
| const std::string | kRootRolePermStr |
| template<typename T > | |
| constexpr std::size_t | length_v = boost::tuples::length<T>::value |
| tuple length shortcut More... | |
| const char * | kCommandExecutorError = "Cannot create CommandExecutorFactory" |
| const char * | kPsqlBroken = "Connection to PostgreSQL broken: %s" |
| const char * | kTmpWsv = "TemporaryWsv" |
| const shared_model::interface::types::SettingKeyType | kMaxDescriptionSizeKey = "MaxDescriptionSize" |
Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
| using iroha::ametsuchi::CommandResult = typedef expected::Result<void, CommandError> |
If command is successful, we assume changes are made, and do not need anything If something goes wrong, Result will contain Error with additional information
| using iroha::ametsuchi::CommitResult = typedef iroha::expected::Result<std::shared_ptr<const iroha::LedgerState>, std::string> |
| using iroha::ametsuchi::concat = typedef decltype(concat_impl<Tuple1, Tuple2>( std::make_index_sequence<length_v<std::decay_t<Tuple1> >>{}, std::make_index_sequence<length_v<std::decay_t<Tuple2> >>{})) |
tuple with types from two given tuples
| using iroha::ametsuchi::element_t = typedef typename boost::tuples::element<N, T>::type |
tuple element type shortcut
| using iroha::ametsuchi::QueryErrorType = typedef shared_model::interface::QueryResponseFactory::ErrorQueryType |
| typedef std::unique_ptr< shared_model::interface::QueryResponse > iroha::ametsuchi::QueryExecutorResult |
| using iroha::ametsuchi::TxCacheStatusType = typedef std::variant<tx_cache_status_responses::Committed, tx_cache_status_responses::Rejected, tx_cache_status_responses::Missing> |
Sum type of all possible concrete responses from the tx cache.
| using iroha::ametsuchi::WsvCommandResult = typedef expected::Result<void, WsvError> |
If command is successful, we assume changes are made, and do not need anything If something goes wrong, Result will contain WsvError with additional information
| using iroha::ametsuchi::WsvError = typedef std::string |
Error returned by wsv command. It is a string which contains what action has failed (e.g, "failed to insert role"), and an error which was provided by underlying implementation (e.g, database exception info)
| decltype(auto) constexpr iroha::ametsuchi::apply | ( | Tuple && | t, |
| F && | f | ||
| ) |
apply F to Tuple

| auto iroha::ametsuchi::concat_impl | ( | std::index_sequence< Is... > | , |
| std::index_sequence< Js... > | |||
| ) | -> boost::tuple< element_t< Is, std::decay_t< Tuple1 >>..., element_t< Js, std::decay_t< Tuple2 >>... > |
index sequence helper for concat
| WsvCommandResult iroha::ametsuchi::execute | ( | soci::statement & | st, |
| Function && | error | ||
| ) |

| auto iroha::ametsuchi::flatMapValue | ( | T & | t, |
| F && | f | ||
| ) |

| boost::optional<C> iroha::ametsuchi::flatMapValues | ( | T & | t, |
| F && | f | ||
| ) |

| shared_model::interface::types::DomainIdType iroha::ametsuchi::getDomainFromName | ( | const shared_model::interface::types::AccountIdType & | account_id | ) |


|
inlinenoexcept |
Retrieve hash from status
| status | - transaction status obtained from cache |

| decltype(auto) constexpr iroha::ametsuchi::index_apply | ( | F && | f | ) |
apply F to an integer sequence [0, N)

| decltype(auto) constexpr iroha::ametsuchi::index_apply_impl | ( | F && | f, |
| std::index_sequence< Is... > | |||
| ) |
index sequence helper for index_apply

|
inlinenoexcept |
Determine if transaction was already processed by its status
| tx_status | - status obtained from transaction cache |

| auto iroha::ametsuchi::mapValues | ( | T & | t, |
| F && | f | ||
| ) |

|
inline |
| constexpr auto iroha::ametsuchi::rebind | ( | T && | t | ) |
map tuple<optional<Ts>...> to optional<tuple<Ts...>>


| constexpr auto iroha::ametsuchi::viewPermissions | ( | T && | t | ) |
view last length_v<R> elements of T without copying
| constexpr auto iroha::ametsuchi::viewQuery | ( | T && | t | ) |
view first length_v<R> elements of T without copying
| const char* iroha::ametsuchi::kCommandExecutorError = "Cannot create CommandExecutorFactory" |
| const shared_model::interface::types::SettingKeyType iroha::ametsuchi::kMaxDescriptionSizeKey = "MaxDescriptionSize" |
Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
| const char* iroha::ametsuchi::kPsqlBroken = "Connection to PostgreSQL broken: %s" |
| const std::string iroha::ametsuchi::kRootRolePermStr |
| const char* iroha::ametsuchi::kTmpWsv = "TemporaryWsv" |
| constexpr std::size_t iroha::ametsuchi::length_v = boost::tuples::length<T>::value |
tuple length shortcut