-
Notifications
You must be signed in to change notification settings - Fork 553
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
V3.0 #69
Conversation
Up to now there was a circular relationship between the database object and the table objects. Now each table gets a StorageProxy which forwards read and write operations to the storage and allows access only to the corresponding table data. Also, the database object is now responsible for cleaning up the storage. The table objects can no longer be used as a context manager (as suggested by @krisztianfekete in #70). In addition, the database object will close the storage if it is garbage collected and `close` hasn't been called yet. See discussion in #70
I've finally gotten around to finish the missing bits. @eugene-eeo Could you have a look at this whether we're missing something for v3.0? |
@msiemens you probably want to expose some API for clearing the cache "properly"- at the moment tinyrecord relies on the I especially like the Query modifiers- so elegant! A little critique but I would probably use a frozenset to represent the |
- Add a `clear_cache` method to Tables - Make OR and AND operations on queries commutative
Good idea, I've added
Good point! I've updated the AND and OR operations to be commutative. As always, thanks for your insight, @eugene-eeo! |
Merge V3.0 again?? GitHub acts strange today...
TinyDB v3.0.0 is now officially released 🎉 |
This PR prepares an overhaul of TinyDB released as version 3.0.
Notable changes:
where('...').contains('...')
has been renamed towhere('...').search('...')
to indicate that it works on regexesUser = Query(); db.find(User.name == 'John')
where('foo')
is an alias forQuery().foo
where('foo').has('bar')
is replaced by eitherwhere('foo').bar
orQuery().foo.bar
where('a.b.c')
is nowQuery()['a.b.c']
where('foo').exists()
SmartCacheTable
has been moved to msiemens/tinydb-smartcacheTodo:
ReviseDocument extension concept (storages, middlewares, custom table classes)SmartCacheTable
to an extension package (depends on Release 1.0 tinydb-smartcache#1)Closes #62, #67, #70