Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

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

未關閉
#662 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
45/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
firebase, python
領域
database

研究方向

先將 Query.get 和 Reference.get 入口點與 issue 中連結的 Firebase Realtime Database REST 文件進行比較。確認 shallow 是否可以與 order_by_child 和 equal_to 組合使用,接著讓 Query.get 接受該參數,並驗證所示的篩選查詢只會傳回參照鍵。

由索引模型根據 Issue 內容生成。

描述

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'
主要語言
Python
星號
1.2k
分支
359
平均合併
3 天 9 小時
30 天內合併 PR
3

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

firebase/firebase-admin-python 的其他 Issue

查看 firebase/firebase-admin-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。