CollectionModelQuery constructor

const CollectionModelQuery(
  1. String path, {
  2. ModelAdapter? adapter,
  3. ModelAccessQuery? accessQuery,
  4. List<ModelValidationQuery>? validationQueries,
})

Query class for defining Model.

It is possible to define the path to be queried and other necessary conditions.

By specifying adapter, you can change the behavior when reading and saving data. If no adapter is specified, ModelAdapter.primary is used.

If accessQuery is specified, you can specify endpoints, etc. in ModelAdapter.

If validationQueries is specified, you can specify the data validation of the model to be used.

Use DocumentModelQuery for documents.

Execute create to create a DocumentModelQuery with the specified ID.

The following elements can be specified by chaining equal, notEqual, lessThanOrEqual, greaterThanOrEqual, contains, containsAny, where, notWhere, isNull, isNotNull, like , geo, orderByAsc, orderByDesc, notifyDocumentChangesand limitTo can be specified in a chain to filter elements.

Modelを定義するためのクエリクラス。

クエリ対象となるpathと他必要な条件を定義することが可能です。

adapterを指定することでデータの読取・保存の際の挙動を変えることができます。adapterは何も指定されない場合ModelAdapter.primaryが使用されます。

accessQueryを指定した場合、ModelAdapterでのエンドポイント等を指定できます。

validationQueriesを指定した場合、利用するモデルのデータバリデーションを指定できます。

ドキュメントに対してはDocumentModelQueryを使用してください。

createを実行すると指定したIDを持つDocumentModelQueryを作成することができます。

equalnotEquallessThanOrEqualgreaterThanOrEqualcontainscontainsAnywherenotWhereisNullisNotNulllikegeoorderByAscorderByDesclimitTonotifyDocumentChangesをチェインして指定していくことにより要素のフィルタリングが可能です。

Implementation

const CollectionModelQuery(
  super.path, {
  super.adapter,
  super.accessQuery,
  super.validationQueries,
});