Open Daeda88 opened 4 weeks ago
I still need to add Readme/some tests, but feedback would already be appreciated @nbransby as I wont be able to continue until next week
Now fully ready for review @nbransby / @Reedyuk . See description above for details of changes.
Fixes #604 and trumps #605
This solution extends all update methods in Firestore to support more advanced update methods. String fields and FieldPaths can now be used interchangably and custom serializer can be passed.
becomes
Note that the existing vararg pairs can still be used.
Similar support has been added to
where
clauses as well asstartAt
/endAt
/etc:There is a small regression on the existing update methods in that
public fun update(documentRef: DocumentReference, vararg fieldsAndValues: Pair<String, Any?>, buildSettings: EncodeSettings.Builder.() -> Unit)
changed topublic fun update(documentRef: DocumentReference, buildSettings: EncodeSettings.Builder.() -> Unit, vararg fieldsAndValues: Pair<String, Any?>)
due to Kotlin not being able to figure out which update method to use.Furthermore, I've split the Firestore tests into a few different files and extended them so they clean up all data after completion.
Lastly, I discovered bug #613 and fixed it