@@ -36,6 +36,9 @@ You can build paths to your data by using the ``collection()`` and ``document()`
36
36
Save Data
37
37
---------
38
38
39
+ set
40
+ ^^^
41
+
39
42
To store data in a collection named ``Marvels `` and a document inside
40
43
the collection named ``Movies ``, use ``set() `` method.
41
44
@@ -59,6 +62,8 @@ the collection named ``Movies``, use ``set()`` method.
59
62
document.
60
63
61
64
65
+ add
66
+ ^^^
62
67
63
68
To store data in a collection named ``Marvels `` within an auto
64
69
generated document ID, use ``add() `` method.
@@ -82,6 +87,12 @@ generated document ID, use ``add()`` method.
82
87
Read Data
83
88
---------
84
89
90
+ |document-get |
91
+ ^^^^^^^^^^^^^^
92
+
93
+ .. |document-get | replace ::
94
+ get
95
+
85
96
To read data from an existing document ``Movies `` of the collection
86
97
``Marvels ``, use ``get() `` method.
87
98
@@ -103,6 +114,11 @@ It is possible to filter the data of an document to receive specific fields.
103
114
..
104
115
105
116
117
+ |collection-get |
118
+ ^^^^^^^^^^^^^^^^
119
+
120
+ .. |collection-get | replace ::
121
+ get
106
122
107
123
To fetch data regarding all existing document (document ID and the data
108
124
it contains) of an collection ``Marvels ``, use ``get() `` method.
@@ -112,10 +128,16 @@ it contains) of an collection ``Marvels``, use ``get()`` method.
112
128
fsdb.collection(' Marvels' ).get()
113
129
..
114
130
131
+ .. warning ::
132
+ This ``get() `` method is different from the above stated one, and
133
+ receives different parameters and returns different output.
115
134
116
135
Update Data
117
136
-----------
118
137
138
+ update
139
+ ^^^^^^
140
+
119
141
To add more data to an existing document, use ``update() `` method.
120
142
121
143
.. code-block :: python
@@ -163,6 +185,12 @@ To add an item to an array field in an existing document, use
163
185
Delete Data
164
186
-----------
165
187
188
+ |delete-update |
189
+ ^^^^^^^^^^^^^^^
190
+
191
+ .. |delete-update | replace ::
192
+ update
193
+
166
194
To remove an field from an existing document, use ``update() `` method.
167
195
168
196
.. code-block :: python
@@ -191,6 +219,8 @@ To remove an item to an array field in an existing document, use
191
219
..
192
220
193
221
222
+ delete
223
+ ^^^^^^
194
224
195
225
To remove an existing document in a collection, use ``delete() ``
196
226
method.
0 commit comments