Skip to content
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

RO BDB and other DB open options #233

Open
elico opened this issue Aug 23, 2022 · 2 comments
Open

RO BDB and other DB open options #233

elico opened this issue Aug 23, 2022 · 2 comments

Comments

@elico
Copy link

elico commented Aug 23, 2022

Hey,

I want to use TokyoCabinet and BDB in a ReadOnly mode.
It's possible in the underlying library but I do not see any example of how to use these options when opening a DB file.
An example for BDB and TokyoCabinet would be helpful.

Thanks

@asppsa
Copy link
Collaborator

asppsa commented Aug 28, 2022

Hi,

Doesn't look like we have an option for that at the moment - we can look at adding it though. In the meantime, you can use the backend option when creating your store to configure TokyoCabinet in the way you would like. For example:

bdb = ::TokyoCabinet::BDB.new
bdb.open('my_database.tch', ::TokyoCabinet::BDB::OREADER) # Sorry if this is not 100% correct
store = Moneta.new(:TokyoCabinet, backend: bdb)

@elico
Copy link
Author

elico commented Aug 28, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants