API with transaction and write as parameter
See original GitHub issueI think transaction.GetDocumentSnapshotAsync
and all similar api is not so convenient
Instead, could we write it as
firestoreDB.Collection("players").Document(follow.Key).SnapshotAsync(transaction);
It could be just an extension method
public static Task<DocumentSnapshot> SnapshotAsync(this DocumentReference doc,Transaction transaction,CancellationToken cancellationToken = default(CancellationToken))
{
return transaction.GetDocumentSnapshotAsync(doc,cancellationToken);
}
// same for query / create / set / update / delete
Also I wish this could be possible
firestoreDB.Value.Collection("players").StreamAsync(transaction); // no equivalence in transaction
Issue Analytics
- State:
- Created 5 years ago
- Comments:14
Top Results From Across the Web
Managing Transactions (REST Application Developer's ...
The REST Client API provides transaction control through the /transactions service and a txid parameter available on document manipulation and search ...
Read more >What issues might we have using query parameters in a ...
Here is a case where typical RESTful API scaffolding reaches it's limits. It would probably be preferable to create some convenience methods ...
Read more >REST API Transaction
Parameter Type : Choose GraphQL if you wish to define the GraphQL query to be sent to the endpoint. GraphQL Query:Provide the GraphQL...
Read more >Start Transaction (QYPESTRT, qypeStartTransaction) API
This API can be used to provide both trace type of performance data - collected ... uses the API application identifier parameter as...
Read more >TransactWriteItems - Amazon DynamoDB - AWS Documentation
TransactWriteItems is a synchronous write operation that groups up to 100 action requests. These actions can target items in different tables, but not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That’s a reasonable suggestion, thanks!
We’ll keep it in mind for the future and watch out for other people trying to write common code that works across Transaction and WriteBatch objects. If it’s a common pattern it may be worth introducing the interface.
Transactions are definitely not going away! There is some overlap with other APIs that might help you and others in cases where running everything within the context of a single function is not the best option.
That being said, we value user feedback tremendously and are still very much evolving our API. We haven’t gotten much feedback about this specific part of the API, and as such, value every opinion we can get on this matter. I will discuss your proposal with the rest of our team and keep you updated (likely by the end of next week).