queryDataItems( )


開発者プレビュー

このAPIは変更される可能性があります。プレビュー期間中、開発者からのフィードバックに基づいてバグ修正や新機能がリリースされる予定です。

Creates a query to retrieve items from a database collection.

について queryDataItems() function builds a query to retrieve data items from a collection and returns a DataItemsQueryBuilder オブジェクトがある。

The returned object contains the query definition which is typically used to run the query using the find() 関数である。

You can refine the query by chaining DataItemsQueryBuilder functions onto the query. DataItemsQueryBuilder functions enable you to sort, filter, and control the results that queryDataItems() returns.

について queryDataItems() function runs with the following DataItemsQueryBuilder defaults that you can override:

  • skip: 0
  • limit: 50
  • descending: by _createdDate

The functions that are chained to queryDataItems() are applied in the order they are called. For example, if you sort on an age field in ascending order and then on a 名称 field in descending order, the results are sorted first by the age of the items and then, if there are multiple results with the same age, the items are sorted by name in descending order, per age value.

If the collection that you are querying has references to other collections, by default the data from referenced collections is not retrieved. To get the data from referenced items, specify them in the options.includeReferencedItems parameter.

: When calling queryDataItems() following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set options.consistentRead to 真の.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Read Data Items
Learn more about app permissions.
メソッド宣言
コピー
メソッド・パラメータ
optionsQueryDataItemsOptions

Options for querying data items.

リターン
役に立ちましたか?
はい
いいえ