
2 Aug
2010
2 Aug
'10
11:43 a.m.
isjk escribió:
hi,
I've got a structure like this, struct peer { int md5_; // unique key. int rank_; int degrees_; };
now, I need a composite_key, it can find equal_to "md5" and less than "rank_" and "degrees_" less than 8.
You can't directly do that with a composite key. There's two alternatives:
* Have your composite key defined on (md5_,rank_) (in this order),
do a lower_bound on (md5_value,rank_value), which gives you
the elements with md5_==md5_value and rank_