LogCondition class sealed

One selection condition for entries: LogFilter decomposes into them (LogFilter.conditions), and an entry matches the filter if it matches all of its conditions.

The set of conditions is closed (sealed), and the meaning of each is defined here, in matches. A store with its own query language (SQL) translates conditions with an exhaustive switch without a default branch: a new condition becomes a compile error there, not a silently skipped selection.

for (final condition in query.filter.conditions) {
  switch (condition) {
    case LogAfterCondition(:final time): where.add('time > ${micros(time)}');
    // … a branch per condition
  }
}
Implementers
Annotations
  • @immutable

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

matches(LogEntry entry) → bool
Whether the entry matches the condition: the reference for stores with their own query language (their result must agree with it).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited