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

Open
msiemens opened this Issue Jan 28, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@msiemens
Copy link
Owner

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?

@msiemens msiemens self-assigned this Jan 28, 2019

@eugene-eeo

This comment has been minimized.

Copy link
Contributor

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.

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