Skip to content

How to set options on Storage creation? #4

Description

@glebpom

I'd like to initialize ledb with no_lock lmdb option, because I'm maintaining locks in my code. Is there an option to set this flag in Options struct? Thanks

Activity

  1. katyo commented on Mar 27, 2021

    @katyo
    Owner

    Seems fields of options is private:
    https://docs.rs/ledb/0.4.0/src/ledb/storage.rs.html#99-128

    It because I planned to turn Options to builder but I don't sure how it may be implemented more usably.
    You can fix that and open PR.

    As alternative you can use serde-way (something like json macro) to set corresponding options (see code above).

  2. glebpom commented on Mar 27, 2021

    @glebpom
    Author

    There are crates like https://crates.io/crates/derive_builder to create builders easily. For sure, I can create PR. What do you think about adding the dependency?

  3. katyo commented on Mar 27, 2021

    @katyo
    Owner

    The compile-time dependencies is not so terrible for me, so you absolutely free to add any of it without hesitation while it is maintained and does not break compilation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions