A library to have your app interact with Firestore in Elm
Drills down document paths with a specific path name.
This function is aimed to be chanind with pipeline operators in order to build up document path.
firestore
|> Firestore.collection "users"
|> Firestore.collection "items"
|> Firestore.collection "tags"
|> Firestore.get
|> Task.attempt GotUserItemTagsOf course, you can make it a single string as well
firestore
|> Firestore.collection "users/items/tags"
|> Firestore.get
|> Task.attempt GotUserItemTagsUpdates configuration
A record structure for a document fetched from Firestore.
A type for a document before persisted on Firestore.
This type works like a wrapper for encoders that ensures encoders given to create or patch are consisted of ones provided from Firestore.Encode module.
Creates a new document for create or patch.
This function works like Encode.object but accepts a list of tuples which has encoders provided from Firestore.Encode module
Firestore.draft
[ ( "name", Firestore.Encode.string "IzumiSy" )
, ( "age", Firestore.Encode.int 26 )
, ( "canCode", Firestore.Encode.bool True )
]An error type
This type is available in order to disregard type of errors between protocol related errors as Http_ or backend related errors as Response.
Data structure for errors from Firestore
Data type for Transaction
A time transaction commited at
Starts a new transaction.
Commits a transaction, while optionally updating documents.
Only readWrite transaction is currently supported which requires authorization that can be set via Config.withAuthorization function.
Adds a new update into the transaction
model.firestore
|> Firestore.commit
(transaction
|> Firestore.update draft1
|> Firestore.update draft2
|> Firestore.update draft3
)
|> Task.attempt Commited
Data type for Firestore