googleapis / googleapis/google-cloud-node

Multi DB Batch writes

Aperta
#7,449 5 commenti 0 reazioni 1 assegnatario Rivendicata da @cherylEnkidu Vedi su GitHub
api: firestore library: nodejs-firestore priority: p3 type: question
Lingua principale
TypeScript
Stelle
3.2k
Fork
712
Merge medio
2g 9h
PR unite (30g)
104

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.