cursor start at field フィルタを使用して Firestore コレクションに対してクエリを実行する

コレクションでコンテンツを整理 必要に応じて、コンテンツの保存と分類を行います。

cursor start at field フィルタを使用して Firestore コレクションに対してクエリを実行する

もっと見る

このコードサンプルを含む詳細なドキュメントについては、以下をご覧ください。

コードサンプル

C#

Query query = citiesRef.OrderBy("Population").StartAt(1000000);

Go

query := client.Collection("cities").OrderBy("population", firestore.Asc).StartAt(1000000)

Java

Query query = cities.orderBy("population").startAt(4921000L);

Node.js

const startAtRes = await db.collection('cities')
  .orderBy('population')
  .startAt(1000000)
  .get();

PHP

$query = $citiesRef
    ->orderBy('population')
    ->startAt([1000000]);

Python

cities_ref = db.collection(u'cities')
query_start_at = cities_ref.order_by(u'population').start_at({
    u'population': 1000000
})

Ruby

query = cities_ref.order("population").start_at(1_000_000)

次のステップ

他の Google Cloud プロダクトに関連するコードサンプルの検索およびフィルタ検索を行うには、Google Cloud のサンプルをご覧ください。