streamKey property
String
get
streamKey
The per-query stream identity: same construction as get's cache key, so a stream only ever carries refreshes for THIS query. Keying by collection name alone let two different queries on one collection contaminate each other's listeners with the wrong records.
Public API: consumers that manage subscriptions across rebuilt query instances (e.g. KoolbaseCollectionController) compare identities with this rather than object identity.
A searched query's identity includes its search (#160): its stream never carries the matches to the unsearched list's listeners.
Implementation
String get streamKey {
final key =
CacheStore.buildKey(collectionName, _filters, _userId) + _typedKey;
final s = _fieldSearch;
return s == null ? key : '$key|search:${jsonEncode(s.toJson())}';
}