File tree Expand file tree Collapse file tree 4 files changed +18
-7
lines changed
firestore/src/include/firebase Expand file tree Collapse file tree 4 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -280,12 +280,17 @@ class Firestore {
280280 * any snapshot listeners or Get() calls will return results from cache, and
281281 * any write operations will be queued until network usage is re-enabled via a
282282 * call to EnableNetwork().
283+ *
284+ * If the network was already disabled, calling `DisableNetwork()` again is
285+ * a no-op.
283286 */
284287 virtual Future<void > DisableNetwork ();
285288
286289 /* *
287290 * Re-enables network usage for this instance after a prior call to
288291 * DisableNetwork().
292+ *
293+ * If the network is currently enabled, calling `EnableNetwork()` is a no-op.
289294 */
290295 virtual Future<void > EnableNetwork ();
291296
@@ -296,7 +301,7 @@ class Firestore {
296301 * used. Calling any other methods will result in an error.
297302 *
298303 * To restart after termination, simply create a new instance of `Firestore`
299- * with `Firestore::GetInstance`.
304+ * with `Firestore::GetInstance() `.
300305 *
301306 * `Terminate()` does not cancel any pending writes and any tasks that are
302307 * awaiting a response from the server will not be resolved. The next time you
Original file line number Diff line number Diff line change @@ -33,9 +33,9 @@ class CollectionReferenceInternal;
3333class DocumentReference ;
3434
3535/* *
36- * @brief A CollectionReference refers to a collection of documents location in
37- * a Firestore database and can be used for adding documents, getting document
38- * references, and querying for documents .
36+ * @brief A CollectionReference can be used for adding documents, getting
37+ * document references, and querying for documents (using the methods inherited
38+ * from `Query`) .
3939 *
4040 * @note Firestore classes are not meant to be subclassed except for use in test
4141 * mocks. Subclassing is not supported in production code and new SDK releases
Original file line number Diff line number Diff line change @@ -223,7 +223,9 @@ class DocumentReference {
223223 * @param[in] data A map of field / value pairs to update. Fields can contain
224224 * dots to reference nested fields within the document.
225225 *
226- * @return A Future that will be resolved when the write finishes.
226+ * @return A Future that will be resolved when the client is online and the
227+ * commit has completed against the server. The future will not resolve when
228+ * the device is offline, though local changes will be visible immediately.
227229 */
228230 virtual Future<void > Update (const MapFieldValue& data);
229231
@@ -235,7 +237,9 @@ class DocumentReference {
235237 *
236238 * @param[in] data A map from FieldPath to FieldValue to update.
237239 *
238- * @return A Future that will be resolved when the write finishes.
240+ * @return A Future that will be resolved when the client is online and the
241+ * commit has completed against the server. The future will not resolve when
242+ * the device is offline, though local changes will be visible immediately.
239243 */
240244 virtual Future<void > Update (const MapFieldPathValue& data);
241245
Original file line number Diff line number Diff line change @@ -191,7 +191,9 @@ class DocumentSnapshot {
191191 * @param stb Configures how server timestamps that have not yet been set to
192192 * their final value are returned from the snapshot (optional).
193193 *
194- * @return The value contained in the field.
194+ * @return The value contained in the field. If the field does not exist in
195+ * the document, then a `FieldValue` instance with `is_valid() == false` will
196+ * be returned.
195197 */
196198 virtual FieldValue Get (
197199 const char * field,
You can’t perform that action at this time.
0 commit comments