BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Public Member Functions | Public Attributes | List of all members
graphene::app::database_api_helper Class Reference

#include <database_api_helper.hxx>

Inheritance diagram for graphene::app::database_api_helper:
graphene::app::database_api_impl

Public Member Functions

 database_api_helper (graphene::chain::database &db, const application_options *app_options)
 
 database_api_helper (const graphene::app::application &app)
 
const account_objectget_account_from_string (const std::string &name_or_id, bool throw_if_not_found=true) const
 
const asset_objectget_asset_from_string (const std::string &symbol_or_id, bool throw_if_not_found=true) const
 
template<typename X >
auto make_tuple_if_multiple (X x) const
 
template<typename... X>
auto make_tuple_if_multiple (X... x) const
 
template<typename T >
auto call_end_or_upper_bound (const T &t) const
 
template<typename T , typename... X>
auto call_end_or_upper_bound (const T &t, X... x) const
 
template<typename OBJ_TYPE , typename OBJ_ID_TYPE , typename INDEX_TYPE , typename T , typename... X>
vector< OBJ_TYPE > get_objects_by_x (T application_options::*app_opt_member_ptr, const INDEX_TYPE &idx, const optional< uint32_t > &olimit, const optional< OBJ_ID_TYPE > &ostart_id, X... x) const
 

Public Attributes

graphene::chain::database_db
 
const application_options_app_options = nullptr
 

Detailed Description

Definition at line 28 of file database_api_helper.hxx.

Constructor & Destructor Documentation

◆ database_api_helper() [1/2]

graphene::app::database_api_helper::database_api_helper ( graphene::chain::database db,
const application_options app_options 
)

Definition at line 59 of file database_api.cpp.

◆ database_api_helper() [2/2]

graphene::app::database_api_helper::database_api_helper ( const graphene::app::application app)
explicit

Definition at line 64 of file database_api.cpp.

Member Function Documentation

◆ call_end_or_upper_bound() [1/2]

template<typename T >
auto graphene::app::database_api_helper::call_end_or_upper_bound ( const T &  t) const
inline

Definition at line 57 of file database_api_helper.hxx.

◆ call_end_or_upper_bound() [2/2]

template<typename T , typename... X>
auto graphene::app::database_api_helper::call_end_or_upper_bound ( const T &  t,
X...  x 
) const
inline

Definition at line 61 of file database_api_helper.hxx.

◆ get_account_from_string()

const account_object * graphene::app::database_api_helper::get_account_from_string ( const std::string &  name_or_id,
bool  throw_if_not_found = true 
) const

Definition at line 3042 of file database_api.cpp.

◆ get_asset_from_string()

const asset_object * graphene::app::database_api_helper::get_asset_from_string ( const std::string &  symbol_or_id,
bool  throw_if_not_found = true 
) const

Definition at line 3068 of file database_api.cpp.

◆ get_objects_by_x()

template<typename OBJ_TYPE , typename OBJ_ID_TYPE , typename INDEX_TYPE , typename T , typename... X>
vector<OBJ_TYPE> graphene::app::database_api_helper::get_objects_by_x ( T application_options::*  app_opt_member_ptr,
const INDEX_TYPE &  idx,
const optional< uint32_t > &  olimit,
const optional< OBJ_ID_TYPE > &  ostart_id,
X...  x 
) const
inline

Definition at line 65 of file database_api_helper.hxx.

◆ make_tuple_if_multiple() [1/2]

template<typename X >
auto graphene::app::database_api_helper::make_tuple_if_multiple ( x) const
inline

Template functions for simple list_X and get_X_by_T APIs, to reduce duplicate code

Definition at line 49 of file database_api_helper.hxx.

◆ make_tuple_if_multiple() [2/2]

template<typename... X>
auto graphene::app::database_api_helper::make_tuple_if_multiple ( X...  x) const
inline

Definition at line 53 of file database_api_helper.hxx.

Member Data Documentation

◆ _app_options

const application_options* graphene::app::database_api_helper::_app_options = nullptr

Definition at line 36 of file database_api_helper.hxx.

◆ _db

graphene::chain::database& graphene::app::database_api_helper::_db

Definition at line 35 of file database_api_helper.hxx.


The documentation for this class was generated from the following files: