-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] composite key partial matching for ordered index #21
Comments
I think this can be done with the function+macro_attr. |
@huang12zheng, thank you for the comment. Do you mean it can be done on the current library code a086ff8 ? |
Feedback and revisions are welcome. |
@huang12zheng This is pretty great to have, just what I was looking for. Any reason we can't merged this @lun3x ? |
Thank you for developing the great library. rust version of Boost.MultiIndex like container is what I want to have.
Perhaps it has already planned in your roadmap, but I'd like to have the follwoing feature.
Boost.MultiIndex for C++ supports composite key partial matching for ordered index.
If this library has similar functionality, it's very useful.
elem_t
elem_t has
name
,time_stamp
, andrank
.Let's say inseting the following elements.
NOTE: It doesn't mean internal structure.
Let's say there are two composite indexes. The first index (
tag_name_ts
) conteinname
andtime_stamp
in this order. The second index (tag_name_rank
) containsname
andrank
in this order.When I get elements by the first index (
tag_name_ts
), and passes onlyname
"bbb" the left most element, then return the list of elem_t their name is "bbb" and their time_stamp is ordered by time_stamp.When I get elements by the second index (
tag_name_rank
), and passes onlyname
"bbb" the left most element, then return the list of elem_t their name is "bbb" and their time_stamp is ordered by rank.It is similar behavir as RDB index.
Example
Here is a code example that demonstrates my feature request:
godbolt running demo
https://godbolt.org/z/9x8MKh6vW
C++ code (Boost.MultiIndex)
Output
The text was updated successfully, but these errors were encountered: