googleapis / googleapis/google-cloud-node
Multi DB Batch writes
- Dominant language
- TypeScript
- Stars
- 3.2k
- Forks
- 712
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 99
Description
Hi all,
Im currently implementing regional db's in my organization and Im wondering if batchWrites will use the internal firebase ref to target the correct database or if all operations (set, update, delete, etc.) will use be written to the database the batch was created from.
e.g.
```js
...
dbp1 = admin.app('us').firestore().doc('/path/to/doc/us');
dbp2 = admin.app('ca').firestore().doc('diff/path');
const batch = admin.app('ca').firestore().batch();
batch.set(dbp1, { updatedAt: now });
batch.set(dbp2, { updatedAt: now });
batch.commit()
...
```
^^^ Will this write to both 'us' and 'ca' databases or just the 'ca' one.
Contributor guide
Assessment
This issue has not been assessed yet.