Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create infrastructure for custom table classes
Now one can set which table class TinyDB should use by setting the `table_class` attribute on the TinyDB class or instance. This gives us the flexibility to introduce more powerful features in custom table classes without flooding `TinyDB.__init__` and `TinyDB.table` with additional special arguments. This also deprecates the `smart_cache` argument of `TinyDB.__init__` and `TinyDB.table` in favor of this feature. Example: TinyDB.table_class = SmartCacheTable # For all new instances db.table_class = SmartCacheTable # For all new tables
- Loading branch information
Showing
4 changed files
with
54 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters