Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[FR] Can we add `shallow` support to `Query.get` like `Reference.get`...?

Aperta
#662 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
firebase, python
Ambito
database

Direzione di ricerca

Inizia confrontando i punti di ingresso Query.get e Reference.get con la documentazione REST di Firebase Realtime Database collegata nell’issue. Verifica se shallow può essere combinato con order_by_child ed equal_to, quindi fai in modo che Query.get accetti il parametro e verifica che la query filtrata mostrata restituisca solo chiavi di riferimento.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

api: database type: feature request

Is your feature request related to a problem? Please describe.

The addition of the shallow parameter when retrieving data was requested in #61 and accepted in #109, but this only added the shallow param to Reference.get. I have a Query (order_by_child) that I would like to shallow, but Query.get doesn't support the param.

Describe the solution you'd like

I don't see any limitation to having both the orderByChild and shallow parameters in the docs for RTDB via Rest, but admittedly I haven't tried it yet. If there are none, can we add shallow to Query.get, too?

Describe alternatives you've considered

None exist, as far as I know, if I need to select a subset of paths filtered by criteria but only want the keys of those refs. Open to suggestion otherwise...

Additional context

Expected

>>> just_ids_please = (firebase_admin.db
...    .reference("/path/to/resource")
...    .order_by_child("some/child")
...    .equal_to("some_value")
...).get(shallow=True)
...
>>>

Actual

>>> just_ids_please = (firebase_admin.db
...    .reference("/path/to/resource")
...    .order_by_child("some/child")
...    .equal_to("some_value")
...).get(shallow=True)
...
TypeError: get() got an unexpected keyword argument 'shallow'
Lingua principale
Python
Stelle
1.2k
Fork
359
Merge medio
3g 9h
PR unite (30g)
3

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di firebase/firebase-admin-python

Tutte le issue di firebase/firebase-admin-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.