13 dbs_comment_vote::dbs_comment_vote(
database& db)
23 return db_impl().get<comment_vote_object, by_comment_voter>(boost::make_tuple(comment_id, voter_id));
25 FC_CAPTURE_AND_RETHROW((comment_id)(voter_id))
32 const auto& vote_idx =
db_impl().get_index<comment_vote_index>().indices().get<by_comment_voter>();
33 auto vote_itr = vote_idx.lower_bound(comment_id);
34 while (vote_itr != vote_idx.end() && vote_itr->comment == comment_id)
36 ret.push_back(std::cref(*(vote_itr++)));
47 const auto& vote_idx =
db_impl().get_index<comment_vote_index>().indices().get<by_comment_weight_voter>();
48 auto vote_itr = vote_idx.lower_bound(comment_id);
49 while (vote_itr != vote_idx.end() && vote_itr->comment == comment_id)
51 ret.push_back(std::cref(*(vote_itr++)));
59 return nullptr !=
db_impl().find<comment_vote_object, by_comment_voter>(std::make_tuple(comment_id, voter_id));
64 const auto& vote_idx =
db_impl().get_index<comment_vote_index>().indices().get<by_comment_voter>();
67 while (vote_itr != vote_idx.end() && vote_itr->comment == comment_id)
69 const auto& cur_vote = *vote_itr;
tracks the blockchain state in an extensible manner
dba::db_index & db_impl()
virtual const object_type & get() const override
virtual void remove() override
virtual bool is_exists() const override
oid< comment_object > comment_id_type