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

Direct access to the underlying storage #258

Closed
msiemens opened this issue Jan 28, 2019 · 2 comments
Closed

Direct access to the underlying storage #258

msiemens opened this issue Jan 28, 2019 · 2 comments
Assignees

Comments

@msiemens
Copy link
Owner

@msiemens msiemens commented Jan 28, 2019

Raised in https://forum.m-siemens.de/d/56-explicitly-flush-with-caching-middleware:

Sometimes it's useful to have direct access to the storage a TinyDB instance uses if the storage exposes additional methods/properties besides read() and write(). For example the CachingMiddleware has a flush() method, which one cannot call manually without using the internal db._storage variable.

Maybe we could expose the storage using a read-only property on TinyDB instances.

@eugene-eeo What do you think?

@eugene-eeo
Copy link
Contributor

@eugene-eeo eugene-eeo commented Jan 28, 2019

@msiemens yeah I don't see any issues with this. I guess we have to add a warning to the docs that if you access storage then you need to know what you're doing.

@msiemens msiemens closed this in 02ee040 Mar 16, 2019
@msiemens
Copy link
Owner Author

@msiemens msiemens commented Mar 16, 2019

Now implemented in v3.13.0 🙂

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

Successfully merging a pull request may close this issue.

None yet
2 participants