Closed wku closed 9 years ago
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()
Thanks for reporting! This should be fixed in 45a4d4b. Can you confirm this?
thank, everything works.
Great! I've just released v2.2.2, where this is fixed :)
v2.2.2
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}]