Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
クライアント側のページネーションを実行できるように、優先順位の代わりに index で beginAt と endAt を使用する方法はありますか?
ソートのために、null 以外の値に .priority を割り当てます。
これは、startAt / endAt の 2 番目の引数を使用して行うことができます。
メッセージを並べ替えるときは優先度が常に優先されることに注意してください。そのため、インデックスで並べ替えるすべてのアイテムの優先度を同じ (つまり null) にする必要があります。
次に、これを行うだけです:
ref.startAt(null, indexToStartAt).endAt(null, indexToEndAt);