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

[FR] Complex database queries should support realtime updates

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

還沒有人認領這個 Issue。

評估

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

研究方向

從 Query 類別開始,檢查現有的 listener 路徑,包括 _listen_with_session 和 create_listener_session。比較查詢參數傳遞至 REST API 的方式,然後確認 listen() 能為 order_by_child() 和其他複雜查詢提供即時更新,同時不影響現有的 listener。

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

描述

api: database type: feature request

Is your feature request related to a problem? Please describe.
There is currently no listen() function for complex queries. This means that you for example cannot listen for realtime updates on the result of order_by_child().

This feature is supported by the underlying REST API, and also in the pyrebase Python client library.

Describe the solution you'd like
A listen() function in the Query class.

Describe alternatives you've considered

  • Use pyrebase
  • Do sorting and filtering client-side

Additional context

Adding the following code into the Query class seems to be enough to implement this feature:

  def listen(self, callback):
       return self._listen_with_session(callback)

   def _listen_with_session(self, callback, session=None):
       url = self._client.base_url + self._pathurl
       if not session:
           session = self._client.create_listener_session()

       try:
           sse = _sseclient.SSEClient(url, session, params=self._querystr)
           return ListenerRegistration(callback, sse)
       except requests.exceptions.RequestException as error:
           raise _Client.handle_rtdb_error(error)
主要語言
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 摘要。