CatapultServer
v0.5.0.1 (Elephant)
|
Namespaces | |
bson_stream | |
Functions | |
bsoncxx::document::value | ToDbModel (const state::AccountState &accountState) |
Maps an account state (accountState) to the corresponding db model value. More... | |
bsoncxx::document::value | ToDbModel (const model::BlockElement &blockElement) |
Maps a blockElement to the corresponding db model entity. More... | |
model::HashRange | ToModel (mongocxx::cursor &cursor, size_t numHashes) |
Maps numHashes db hashes under cursor to a hash range. More... | |
model::HashRange | ToModel (const std::vector< bsoncxx::document::view > &hashContainer, size_t numHashes) |
Maps numHashes db hashes from hashContainer to a hash range. More... | |
bsoncxx::types::b_binary | ToBinary (const uint8_t *pData, size_t size) |
Converts raw array (pData) of size elements into bson binary type. More... | |
bsoncxx::types::b_binary | ToBinary (const UnresolvedAddress &unresolvedAddress) |
Converts unresolvedAddress into bson binary type. More... | |
uint8_t | ToUint8 (int32_t value) |
Converts a 32 bit signed value to an 8 bit unsigned value. More... | |
uint32_t | ToUint32 (int32_t value) |
Converts a 32 bit signed value to a 32 bit unsigned value. More... | |
uint64_t | GetUint64OrDefault (const bsoncxx::document::view &documentView, const char *name, uint64_t defaultValue) |
Attempts to read a uint64 value from documentView with name, returning defaultValue if no such value exists. More... | |
bool | IsEmptyDocument (const bsoncxx::document::value &document) |
Returns true if document is empty. More... | |
bson_stream::document & | StreamEmbeddedTransaction (bson_stream::document &builder, const model::EmbeddedTransaction &transaction) |
Streams an embedded transaction to builder. More... | |
bson_stream::document & | StreamVerifiableEntity (bson_stream::document &builder, const model::VerifiableEntity &entity) |
Streams a verifiable entity to builder. More... | |
bson_stream::array_context & | StreamMosaic (bson_stream::array_context &context, MosaicId id, Amount amount) |
Streams a mosaic composed of id and amount to context. More... | |
bson_stream::array_context & | StreamMosaic (bson_stream::array_context &context, UnresolvedMosaicId id, Amount amount) |
Streams a mosaic composed of id and amount to context. More... | |
bson_stream::document & | StreamReceipt (bson_stream::document &builder, const model::Receipt &receipt) |
Streams a receipt to builder. More... | |
template<size_t N, typename TTag > | |
auto | ToBinary (const utils::ByteArray< N, TTag > &array) |
Converts byte array into bson binary type. More... | |
template<typename TBaseValue , typename X = std::enable_if_t<std::is_same_v<uint32_t, typename TBaseValue::ValueType>>> | |
int32_t | ToInt32 (TBaseValue value) |
Converts base value to int32_t. More... | |
template<typename TBaseValue , typename X = std::enable_if_t<std::is_same_v<uint64_t, typename TBaseValue::ValueType>>> | |
int64_t | ToInt64 (TBaseValue value) |
Converts base value to int64_t. More... | |
template<typename TBaseValue , typename TBsonElement , typename X = std::enable_if_t<std::is_same_v<uint64_t, typename TBaseValue::ValueType>>> | |
TBaseValue | GetValue64 (TBsonElement element) |
Gets a 64-bit value from element and converts it to a base value. More... | |
template<size_t N, typename TTag , typename TMongoContainer > | |
void | DbBinaryToModelArray (utils::ByteArray< N, TTag > &dest, const TMongoContainer &source) |
Populates dest with data from source. More... | |
void | StreamReceipt (bson_stream::document &builder, const model::Receipt &receipt, const MongoReceiptRegistry &receiptRegistry) |
Streams a receipt into builder using receiptRegistry for mapping derived receipt types. More... | |
template<typename TArtifactId > | |
void | StreamReceipt (bson_stream::document &builder, const model::ArtifactExpiryReceipt< TArtifactId > &receipt) |
Streams receipt into builder. More... | |
bsoncxx::document::value | ToDbModel (Height height, const model::AddressResolutionStatement &statement) |
Maps a statement at height to the corresponding db model value. More... | |
bsoncxx::document::value | ToDbModel (Height height, const model::MosaicResolutionStatement &statement) |
Maps a statement at height to the corresponding db model value. More... | |
std::vector< bsoncxx::document::value > | ToDbDocuments (const model::Transaction &transaction, const MongoTransactionMetadata &metadata, const MongoTransactionRegistry &transactionRegistry) |
bsoncxx::document::value | ToDbModel (Height height, const model::TransactionStatement &statement, const MongoReceiptRegistry &receiptRegistry) |
Maps a statement at height to the corresponding db model value using receiptRegistry for mapping derived receipt types. More... | |
bsoncxx::document::value | ToDbModel (const model::TransactionStatus &status) |
Maps a transaction status to the corresponding db model value. More... | |
void catapult::mongo::mappers::DbBinaryToModelArray | ( | utils::ByteArray< N, TTag > & | dest, |
const TMongoContainer & | source | ||
) |
Populates dest with data from source.
uint64_t catapult::mongo::mappers::GetUint64OrDefault | ( | const bsoncxx::document::view & | documentView, |
const char * | name, | ||
uint64_t | defaultValue | ||
) |
Attempts to read a uint64 value from documentView with name, returning defaultValue if no such value exists.
TBaseValue catapult::mongo::mappers::GetValue64 | ( | TBsonElement | element | ) |
Gets a 64-bit value from element and converts it to a base value.
bool catapult::mongo::mappers::IsEmptyDocument | ( | const bsoncxx::document::value & | document | ) |
Returns true
if document is empty.
bson_stream::document & catapult::mongo::mappers::StreamEmbeddedTransaction | ( | bson_stream::document & | builder, |
const model::EmbeddedTransaction & | transaction | ||
) |
Streams an embedded transaction to builder.
bson_stream::array_context & catapult::mongo::mappers::StreamMosaic | ( | bson_stream::array_context & | context, |
MosaicId | id, | ||
Amount | amount | ||
) |
Streams a mosaic composed of id and amount to context.
bson_stream::array_context & catapult::mongo::mappers::StreamMosaic | ( | bson_stream::array_context & | context, |
UnresolvedMosaicId | id, | ||
Amount | amount | ||
) |
Streams a mosaic composed of id and amount to context.
void catapult::mongo::mappers::StreamReceipt | ( | bson_stream::document & | builder, |
const model::ArtifactExpiryReceipt< TArtifactId > & | receipt | ||
) |
Streams receipt into builder.
bson_stream::document & catapult::mongo::mappers::StreamReceipt | ( | bson_stream::document & | builder, |
const model::Receipt & | receipt | ||
) |
Streams a receipt to builder.
void catapult::mongo::mappers::StreamReceipt | ( | bson_stream::document & | builder, |
const model::Receipt & | receipt, | ||
const MongoReceiptRegistry & | receiptRegistry | ||
) |
Streams a receipt into builder using receiptRegistry for mapping derived receipt types.
bson_stream::document & catapult::mongo::mappers::StreamVerifiableEntity | ( | bson_stream::document & | builder, |
const model::VerifiableEntity & | entity | ||
) |
Streams a verifiable entity to builder.
bsoncxx::v_noabi::types::b_binary catapult::mongo::mappers::ToBinary | ( | const uint8_t * | pData, |
size_t | size | ||
) |
Converts raw array (pData) of size elements into bson binary type.
bsoncxx::v_noabi::types::b_binary catapult::mongo::mappers::ToBinary | ( | const UnresolvedAddress & | unresolvedAddress | ) |
Converts unresolvedAddress into bson binary type.
auto catapult::mongo::mappers::ToBinary | ( | const utils::ByteArray< N, TTag > & | array | ) |
Converts byte array into bson binary type.
std::vector< bsoncxx::document::value > catapult::mongo::mappers::ToDbDocuments | ( | const model::Transaction & | transaction, |
const MongoTransactionMetadata & | metadata, | ||
const MongoTransactionRegistry & | transactionRegistry | ||
) |
Maps a transaction with metadata to representative db documents using transactionRegistry for mapping derived transaction types.
bsoncxx::document::value catapult::mongo::mappers::ToDbModel | ( | const model::BlockElement & | blockElement | ) |
Maps a blockElement to the corresponding db model entity.
bsoncxx::document::value catapult::mongo::mappers::ToDbModel | ( | const model::TransactionStatus & | status | ) |
Maps a transaction status to the corresponding db model value.
bsoncxx::document::value catapult::mongo::mappers::ToDbModel | ( | const state::AccountState & | accountState | ) |
Maps an account state (accountState) to the corresponding db model value.
bsoncxx::document::value catapult::mongo::mappers::ToDbModel | ( | Height | height, |
const model::AddressResolutionStatement & | statement | ||
) |
Maps a statement at height to the corresponding db model value.
bsoncxx::document::value catapult::mongo::mappers::ToDbModel | ( | Height | height, |
const model::MosaicResolutionStatement & | statement | ||
) |
Maps a statement at height to the corresponding db model value.
bsoncxx::document::value catapult::mongo::mappers::ToDbModel | ( | Height | height, |
const model::TransactionStatement & | statement, | ||
const MongoReceiptRegistry & | receiptRegistry | ||
) |
Maps a statement at height to the corresponding db model value using receiptRegistry for mapping derived receipt types.
int32_t catapult::mongo::mappers::ToInt32 | ( | TBaseValue | value | ) |
Converts base value to int32_t.
int64_t catapult::mongo::mappers::ToInt64 | ( | TBaseValue | value | ) |
Converts base value to int64_t.
model::HashRange catapult::mongo::mappers::ToModel | ( | const std::vector< bsoncxx::document::view > & | hashContainer, |
size_t | numHashes | ||
) |
Maps numHashes db hashes from hashContainer to a hash range.
model::HashRange catapult::mongo::mappers::ToModel | ( | mongocxx::cursor & | cursor, |
size_t | numHashes | ||
) |
Maps numHashes db hashes under cursor to a hash range.
uint32_t catapult::mongo::mappers::ToUint32 | ( | int32_t | value | ) |
Converts a 32 bit signed value to a 32 bit unsigned value.
uint8_t catapult::mongo::mappers::ToUint8 | ( | int32_t | value | ) |
Converts a 32 bit signed value to an 8 bit unsigned value.