Firestore Sweet

Firestore Sweet

  • Tutorial
  • API
  • Github

›Write

Tutorial

  • Getting Started

Read

  • get
  • on
  • ref

Write

  • add
  • set
  • upsert
  • update
  • delete

FieldValue

  • inc
  • del
  • ts
  • union
  • remove

Atomic & Bulk

  • tx
  • batch

delete

delete works the same as firestore delete but with the same syntax as the sweetened get .

delete doc

await db.delete("users", "bob")
// equivalent firestore
await fb.collection("users").doc("bob").delete()

delete multiple docs with query

await db.delete("users", ["age", ">", 30])
// equivalent firestore
const docs = await fb.collection("users").doc("bob").where("age", ">", 30).get()
let batch = fb.batch()
docs.forEach((ss)=>{
  batch.delete(ss._ref)
})
await batch.commit()
← updateNext →
  • delete doc
  • delete multiple docs with query
Firestore Sweet
Docs
Getting StartedAPI Reference
Who's Using Firesotre Sweet ?
WARASHIBEALISCHOOLcrypvoVePress
Where to Find Me ?
ALIS BlogGitHubStar
Follow @ocrybit
Copyright © 2020 Tomoya Nagasawa