firebase / firebase/firebase-admin-python

[FR] Add the `increment` method for realtime database

Đang mở
#675 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
api: database type: feature request
Ngôn ngữ chính
Python
Star
1.2k
Fork
359
Merge trung bình
5 ngày 6 phút
Pull request đã merge (30 ngày)
2

Mô tả

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

Please see this SO [question](https://stackoverflow.com/questions/75486368/how-to-increment-values-in-firebase-realtime-database-python/75486555#75486555) that i have asked.

**Describe the solution you'd like**

I would like to be able to increment a value server side such as :

```
from firebase_admin import db

realtime_db = db.reference(path="/", app=app, url="myurl")
realtime_db.update({
f"chats/{uid}/num": db.increment(1),
})
```

**Describe alternatives you've considered**

The alternative described in the SO question as an answer.

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

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

Đánh giá

Issue này chưa được đánh giá.

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.