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
Copy file name to clipboardExpand all lines: README.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,13 +18,13 @@ I will try to keep up with the latest version of `TinyDB`.
18
18
19
19
***`ujson`:** Using `ujson` instead of `json`. Some arguments aren't compatible with `json`[^1]
20
20
21
-
***Storage `closed` property**: Original `TinyDB` won't raise exceptions when operating on a closed file. Now the property `closed` of `Storage` classes is required to be implemented. An `IOError` should be raised.
21
+
***Storage `closed` property**: Original `TinyDB` won't raise exceptions when operating on a closed file. Now the property `closed` of `Storage` classes is required to be implemented[^why-closed][^operating-on-closed].
22
22
23
-
***[Miscellaneous](#misc)**: Differences only matter in edge cases.
23
+
***[Miscellaneous](#misc)**: Differences that only matter in edge cases.
24
24
25
25
# New Features
26
26
27
-
***Event Hooks**: You can now use event hooks to do something before or after an operation. See [Event Hooks](#event-hooks) for more details.
27
+
***Event Hooks**: You can now use event hooks to hook into an operation. See [Event Hooks](#event-hooks) for more details.
28
28
29
29
***Redesigned ID & Doc Class**: You can [replace](#replacing-id-&-document-class) and [customise them](#customise-id-class) more pleasingly.
30
30
@@ -266,7 +266,7 @@ Make sure you have implemented all the methods required by `BaseDocument` class
266
266
*`search` accepts optional `cond`, returns all docs if no arguments are provided
267
267
*`get` and `contains` raises `ValueError` instead of `RuntimeError` when `cond` and `doc_id` are both `None`
268
268
*`LRUCache` stores `tuple`s of ids instead of `list`s of docs
269
-
*`search` and `get` treat `doc_id` and `doc_ids` as extra conditions instead of ignoring conditions when they are provided. That is to say, when `cond` and `doc_id(s)` are passed, they return docs satisfies both conditions.
269
+
*`search` and `get` treat `doc_id` and `doc_ids` as extra conditions instead of ignoring conditions when they are provided. That is to say, when `cond` and `doc_id(s)` are passed, they return docs satisfies both `cond` and `doc_id(s)`.
270
270
271
271
272
272
@@ -275,3 +275,6 @@ Make sure you have implemented all the methods required by `BaseDocument` class
275
275
[^UUID-version]:Currently using UUID4
276
276
[^disable-db-level]: See [DB-level caching](#db-level-caching) to learn how to disable this feature if it causes dirty reads.
277
277
[^isolevel]: See [isolevel](#isolation-level)
278
+
[^why-closed]: This is for `Middileware` classes to reliably determine whether the `Storage` is closed, so they can raise `IOError`
279
+
[^operating-on-closed]: An `IOError` should be raised when operating on a closed storage.
0 commit comments