Firestore - C# conditional update using ETag/If-Match?

Viewed 67

I'm researching Google Cloud products and Firestore in particular. I see that using the REST API, Firestore populates the ETag header, or perhaps its own X-Firebase-ETag, the docs aren't clear.

I see it supports conditional updates, as it should, via the if-match header.

However I cannot see this critical functionality exposed via the .NET SDK. I can only see a Precondition.LastUpdateTime property which can be used via the DocumentReference.UpdateAsync method. SetOptions has nothing of use.

Am I out of luck? Must I write my own REST implementation if I want to use Firestore?

Update

I posted a feature request to the Firestore team. Jon Skeet, who appears to be fielding GitHub issues on the GCP libs for C#, says that the underlying gRPC does not support this, even though the REST API does.

1 Answers

This feature is not currently supported. The feature is not available in the underlying gRPC API.

Here's a link to the API that affords conditional updates.

DocumentReference.UpdateAsync

Related