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

Function set

tinydb/operations.py:42–49  ·  view source on GitHub ↗

Set a given field to ``val``.

(field, val)

Source from the content-addressed store, hash-verified

40
41
42def set(field, val):
43 """
44 Set a given field to ``val``.
45 """
46 def transform(doc):
47 doc[field] = val
48
49 return transform
50
51
52def increment(field):

Callers 5

test_setFunction · 0.90
tablesMethod · 0.85
getMethod · 0.85
test_unique_idsFunction · 0.85
test_drop_tableFunction · 0.85

Calls

no outgoing calls

Tested by 3

test_setFunction · 0.72
test_unique_idsFunction · 0.68
test_drop_tableFunction · 0.68