Implement by_asset_balance index #529
This commit is contained in:
parent
aa6d13b057
commit
d8cd48d6ad
1 changed files with 20 additions and 6 deletions
|
|
@ -289,8 +289,8 @@ namespace graphene { namespace chain {
|
||||||
map< account_id_type, set<account_id_type> > referred_by;
|
map< account_id_type, set<account_id_type> > referred_by;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct by_asset;
|
|
||||||
struct by_account_asset;
|
struct by_account_asset;
|
||||||
|
struct by_asset_balance;
|
||||||
/**
|
/**
|
||||||
* @ingroup object_index
|
* @ingroup object_index
|
||||||
*/
|
*/
|
||||||
|
|
@ -298,12 +298,26 @@ namespace graphene { namespace chain {
|
||||||
account_balance_object,
|
account_balance_object,
|
||||||
indexed_by<
|
indexed_by<
|
||||||
ordered_unique< tag<by_id>, member< object, object_id_type, &object::id > >,
|
ordered_unique< tag<by_id>, member< object, object_id_type, &object::id > >,
|
||||||
ordered_unique< tag<by_account_asset>, composite_key<
|
ordered_unique< tag<by_account_asset>,
|
||||||
account_balance_object,
|
composite_key<
|
||||||
member<account_balance_object, account_id_type, &account_balance_object::owner>,
|
account_balance_object,
|
||||||
member<account_balance_object, asset_id_type, &account_balance_object::asset_type> >
|
member<account_balance_object, account_id_type, &account_balance_object::owner>,
|
||||||
|
member<account_balance_object, asset_id_type, &account_balance_object::asset_type>
|
||||||
|
>
|
||||||
>,
|
>,
|
||||||
ordered_non_unique< tag<by_asset>, member<account_balance_object, asset_id_type, &account_balance_object::asset_type> >
|
ordered_unique< tag<by_asset_balance>,
|
||||||
|
composite_key<
|
||||||
|
account_balance_object,
|
||||||
|
member<account_balance_object, asset_id_type, &account_balance_object::asset_type>,
|
||||||
|
member<account_balance_object, share_type, &account_balance_object::balance>,
|
||||||
|
member<account_balance_object, account_id_type, &account_balance_object::owner>
|
||||||
|
>,
|
||||||
|
composite_key_compare<
|
||||||
|
std::less< asset_id_type >,
|
||||||
|
std::greater< share_type >,
|
||||||
|
std::less< account_id_type >
|
||||||
|
>
|
||||||
|
>
|
||||||
>
|
>
|
||||||
> account_balance_object_multi_index_type;
|
> account_balance_object_multi_index_type;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue