registerQuery static method

String registerQuery(
  1. DuskQuery query
)

Mints a fresh q<N> query handle for the supplied predicate set and stores it for subsequent action-tool re-resolution.

Unlike register, query handles are NEVER deduped: each call mints a fresh token. The caller (the ext.dusk.find handler) verifies that at least one predicate is non-null before invoking this method.

Query handles are NOT scoped to a groupId: they survive snapshot disposal because the predicates are re-executed against the live Semantics tree on every action call. Use disposeAll / resetForTesting to clear them in tests.

Implementation

static String registerQuery(DuskQuery query) {
  _queryCounter += 1;
  final String token = 'q$_queryCounter';
  _queries[token] = query;
  return token;
}