ModelQuery class

Query class for defining Model.

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

Use DocumentModelQuery for documents and CollectionModelQuery for collections.

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

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

ドキュメントに対してはDocumentModelQuery、コレクションに対してはCollectionModelQueryを使用してください。

Annotations

Constructors

ModelQuery(String path, {List<ModelQueryFilter> filters = const [], ModelAccessQuery? accessQuery, List<ModelValidationQuery>? validationQueries, ModelAdapter? adapter, bool useTestModelAdapter = true})
Query class for defining Model.
const

Properties

accessQuery ModelAccessQuery?
Stores information for connecting to the server.
final
adapter ModelAdapter
An adapter for defining the process of reading and saving data. If adapter is not specified, ModelAdapter.primary is used.
no setter
filters List<ModelQueryFilter>
Filter definition for the model.
final
hashCode int
The hash code for this object.
no setteroverride
path String
Path definition for the model.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useTestModelAdapter bool
Set to true to use the model adapter for testing when testing.
final
validationQueries List<ModelValidationQuery>?
Query for data validation.
final

Methods

hasMatchAsList(List<DynamicMap> data) bool
Runs hasMatchAsMap recursively in List and returns true if one of the matches is found.
hasMatchAsMap(DynamicMap? data) bool
Pass filters through data and return true if all conditions are met.
hasMatchAsObject(Object? data) bool
Ignores ModelQueryFilter.key and returns true if it is within all of the conditions in filters.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
seekIndex(List<MapEntry<String, DynamicMap>> sorted, DynamicMap data) int?
The position where data enters is retrieved by searching from sorted according to the sort setting of filters.
sort(List<MapEntry<String, DynamicMap>> data) List<MapEntry<String, DynamicMap>>
Sort data according to the settings in filters.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override