MCPcopy
hub / github.com/msiemens/tinydb / Document

Class Document

tinydb/table.py:26–36  ·  view source on GitHub ↗

A document stored in the database. This class provides a way to access both a document's content and its ID using ``doc.doc_id``.

Source from the content-addressed store, hash-verified

24
25
26class Document(dict):
27 """
28 A document stored in the database.
29
30 This class provides a way to access both a document's content and
31 its ID using ``doc.doc_id``.
32 """
33
34 def __init__(self, value: Mapping, doc_id: int):
35 super().__init__(value)
36 self.doc_id = doc_id
37
38
39class Table:

Callers 4

test_insert_with_doc_idFunction · 0.90
test_upsert_by_idFunction · 0.90

Calls

no outgoing calls

Tested by 4

test_insert_with_doc_idFunction · 0.72
test_upsert_by_idFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…