samedhi / firemore

Firebase + Clojure -> Firemore
https://firemore.org/
MIT License
19 stars 4 forks source link

Confusion between (write!) and (add!) #34

Closed samedhi closed 4 years ago

samedhi commented 4 years ago

I don't like the (write!) vs (add!) difference.

write! is used to write a document to firestore while specifying the id

add! is used to write a document to firestore and let firestore generate the id for you.

My current thinking is that maybe there should only be a (write!), and that it should decide to use or create the id depending on whether you specify a reference to a id or a collection to these functions. I'm going to think about this before committing to anything.