Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[FR] Complex database queries should support realtime updates

Đang mở
#598 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
databases

Hướng nghiên cứu

Bắt đầu trong lớp Query và kiểm tra đường dẫn listener hiện có, bao gồm _listen_with_session và create_listener_session. So sánh cách các tham số truy vấn được truyền đến REST API, sau đó xác minh rằng listen() cung cấp các cập nhật theo thời gian thực cho order_by_child() và các truy vấn phức tạp khác mà không làm hỏng các listener hiện có.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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)
Ngôn ngữ chính
Python
Star
1.2k
Fork
359
Merge trung bình
3 ngày 9 giờ
Pull request đã merge (30 ngày)
3

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của firebase/firebase-admin-python

Tất cả issue của firebase/firebase-admin-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.