クエリロケータの概要
大きく複雑なクエリの結果を 1 回の応答で返すことができない場合、サーバ側カーソルが作成されます。カーソルはデータベース内の追加のクエリ結果の位置を指します。追加の結果は、SOAP API の queryMore() 呼び出しや REST API の nextRecordUrl 項目など、別の呼び出しでクエリロケータを使用して取得することができます。
たとえば、バッチサイズが 2,000 に設定されたクエリ呼び出しがあり、組織に 2,000 以上の取引先があるとします。このシナリオでは SELECT id FROM account が、2,000 件のレコードと、追加の呼び出しで残りのレコードを見つけて取得できる位置を示すクエリロケータを返します。
クエリロケータの長さは 18 文字で、接頭辞 0r8 から始まります。各ロケータと紐付けられた結果は、最初のクエリの実行から 2 日間使用できます。無効あるいは期限の切れたクエリロケータを使用すると、エラーがスローされます。
拡張エラーの詳細をトラブルシューティングに使用する
INVALID_QUERY_LOCATOR エラーおよび関連する拡張エラーコードは、エラーの原因と解決方法に関する情報を提供します。
関連情報
Salesforce SOAP API 開発者ガイド: query()
Salesforce REST API 開発者ガイド: Query
SOQL および SOSL の検索クエリの制限
API コールで使用されるコアデータ型
Apex 開発者ガイド: SOQL クエリおよび SOSL クエリでの Apex 変数の使用
000384958

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.