lib/google/cloud/firestore.rb in google-cloud-firestore-0.21.0 vs lib/google/cloud/firestore.rb in google-cloud-firestore-0.21.1
- old
+ new
@@ -210,13 +210,11 @@
#
# firestore = Google::Cloud::Firestore.new
#
# user_snap = firestore.doc("users/frank").get
#
- # nested_field_path = Google::Cloud::Firestore::FieldPath.new(
- # :favorites, :food
- # )
+ # nested_field_path = firestore.field_path :favorites, :food
# user_snap.get(nested_field_path) #=> "Pizza"
# ```
#
# Or, use {Firestore::Client#get_all} to retrieve a list of document
# snapshots (data):
@@ -353,13 +351,11 @@
#
# firestore = Google::Cloud::Firestore.new
#
# user_ref = firestore.doc "users/frank"
#
- # nested_field_path = Google::Cloud::Firestore::FieldPath.new(
- # :favorites, :food
- # )
- # user_ref.update({ nested_field_path: "Pasta" })
+ # nested_field_path = firestore.field_path :favorites, :food
+ # user_ref.update({ nested_field_path => "Pasta" })
# ```
#
# ## Using transactions and batched writes
#
# Cloud Firestore supports atomic operations for reading and writing data.