kossnocorp / typesaurus

🦕 Type-safe TypeScript-first ODM for Firestore
https://typesaurus.com
415 stars 36 forks source link

get method from transaction read function should accept Query type #95

Closed sushantdhiman closed 6 months ago

sushantdhiman commented 3 years ago

This concern was earlier raised in #6, but was lost in discussion.

For Node.js SDK Transaction support reading multiple documents using get by passing Query.

https://github.com/googleapis/nodejs-firestore/blob/f5bec38de92479ca7930178089843e77411ead3d/types/firestore.d.ts#L450-L457

For Firestore JS SDK I don't think this is supported for Web version.

https://firebase.google.com/docs/reference/js/firebase.firestore.Transaction#get

Current v8 implementation for this library still only supports getting single reference in transaction read function. getshould accept Query as well, so it can read multiple documents and acquire pessimistic lock on them.

kossnocorp commented 6 months ago

Fixed with v10