“Document.set () FirebaseFirestore Java” Kode Jawaban

Firestore mengatur dokumen

let data = {
  name: 'Los Angeles',
  state: 'CA',
  country: 'USA'
};

// Add a new document in collection "cities" with ID 'LA'
let setDoc = db.collection('cities').doc('LA').set(data);
Egg Salad

Document.set () FirebaseFirestore Java

var washingtonRef = db.collection("cities").doc("DC");
// Atomically add a new region to the "regions" array field.
washingtonRef.update({
    regions: firebase.firestore.FieldValue.arrayUnion("greater_virginia")
});
// Atomically remove a region from the "regions" array field.
washingtonRef.update({
    regions: firebase.firestore.FieldValue.arrayRemove("east_coast")
});
Open Oyster

Jawaban yang mirip dengan “Document.set () FirebaseFirestore Java”

Pertanyaan yang mirip dengan “Document.set () FirebaseFirestore Java”

Lebih banyak jawaban terkait untuk “Document.set () FirebaseFirestore Java” di Java

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya