Get the total number of documents in the default table. >>> db = TinyDB('db.json') >>> len(db) 0
(self)
| 258 | # not handled by __getattr__ so we need to forward them manually here |
| 259 | |
| 260 | def __len__(self): |
| 261 | """ |
| 262 | Get the total number of documents in the default table. |
| 263 | |
| 264 | >>> db = TinyDB('db.json') |
| 265 | >>> len(db) |
| 266 | 0 |
| 267 | """ |
| 268 | return len(self.table(self.default_table_name)) |
| 269 | |
| 270 | def __iter__(self) -> Iterator[Document]: |
| 271 | """ |