Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#662 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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時間
マージ済み PR(30日)
3

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

firebase/firebase-admin-python のほかの issue

firebase/firebase-admin-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。