googleapis / googleapis/google-cloud-node
getPartitions on all queries
- Lingua principale
- TypeScript
- Stelle
- 3.2k
- Fork
- 712
- Merge medio
- 2g 9h
- PR unite (30g)
- 104
Descrizione
**Is your feature request related to a problem? Please describe.**
I've seen that the [`getPartitions` API](https://googleapis.dev/nodejs/firestore/latest/CollectionGroup.html#getPartitions) is only available on collection group queries, but not on normal queries. I was wondering why that is. You can always rewrite to use a `collectionGroup`, but it feels weird and unintuitive as a user of the SDK.
**Describe the solution you'd like**
Have partitions on these queries:
```ts
firestore().collection('collectionA/docB/collectionC').getPartitions();
```
**Describe alternatives you've considered**
Alternative, would be to do this:
```ts
firestore().collection('collectionC').getPartitions();
```
And to check for the path ` collectionA/docB/...` on the client.
**Additional context**
This is probably because of the restrictions that [no filters are supported](https://firebase.google.com/docs/firestore/reference/rest/v1beta1/projects.databases.documents/partitionQuery), right?
And to support others there might be the need for creating an additional Firestore index, which is not supported yet.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia esaminando l’API getPartitions esistente e la documentazione Firestore collegata relativa a partitionQuery. Determina in che modo le query normali sulle collection differiscono dalle query sui collection group e se le restrizioni dell’API o i requisiti degli indici impediscono il supporto. Il lavoro è completo quando l’esempio richiesto di percorso della collection è supportato oppure la limitazione è documentata chiaramente se l’implementazione non è possibile.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- google-cloud, typescript
- Ambito
- api, database
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100