You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from tinydb import TinyDB, where
from tinydb.storages import JSONStorage, Storage
from tinydb.middlewares import CachingMiddleware, Middleware
db = TinyDB('db1.json', storage=CachingMiddleware(JSONStorage))
print db.all()
[]
db.insert({'test': 1})
db.close()
print db.all()
[{'test': 1}]
The text was updated successfully, but these errors were encountered:
�CachingMiddleware somehow assumed that there is no data already stored
in the database. Now we always read it �from the wrapped storage if possible.
Closes �#47
from tinydb import TinyDB, where
from tinydb.storages import JSONStorage, Storage
from tinydb.middlewares import CachingMiddleware, Middleware
db = TinyDB('db1.json', storage=CachingMiddleware(JSONStorage))
print db.all()
[]
db.insert({'test': 1})
db.close()
print db.all()
[{'test': 1}]
The text was updated successfully, but these errors were encountered: