QueryBuilder.searchOne constructor
(en) Gets objects from the specified collection that match the specified criteria. It is faster than a "search query" when searching for a single item because the search stops once a hit is found.
(ja) 指定されたコレクションから、条件にマッチするオブジェクトを取得します。 1件のヒットがあった時点で探索を打ち切るため、 単一のアイテムを検索する場合はsearchよりも高速に動作します。
target: The collection name in DB.queryNode: This is the node object used for the search. You can build queries by combining the various nodes defined in comparison_node.dart.cause: Optional metadata for auditing or logging. Useful in high-security environments or for autonomous AI programs to record the reason or initiator of a query.
Implementation
QueryBuilder.searchOne({
required this.target,
required QueryNode this.queryNode,
this.cause,
}) : type = EnumQueryType.searchOne;