Skip to content

How to handle range for non-trivial keys? #106

Closed Answered by marvin-j97
jamesmunns asked this question in Q&A
Discussion options

You must be logged in to vote

range("devices/123/logs/000000AF"..="devices/123/logs/000000BD") should work fine.

fn main() -> fjall::Result<()> {
    let keyspace = fjall::Config::default().open()?;
    let partition = keyspace.open_partition("default", Default::default())?;

    partition.insert("devices/122/logs/000000AE", "!!!")?;
    partition.insert("devices/123/logs/000000AE", "!!!")?;
    partition.insert("devices/123/logs/000000AF", "inside")?;
    partition.insert("devices/123/logs/000000B0", "inside")?;
    partition.insert("devices/123/logs/000000BD", "inside")?;
    partition.insert("devices/123/logs/000000BE", "!!!")?;
    partition.insert("devices/124/logs/000000AE", "!!!")?;

    assert_eq!(
        3,

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@jamesmunns
Comment options

Answer selected by jamesmunns
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested api
2 participants
Converted from issue

This discussion was converted from issue #105 on December 10, 2024 17:23.