LogQuery class final

A query for entries to LogReader: selection conditions (filter), order and page.

Only a description of the query; how to run it is up to the store: SQL, queryInMemory for entries in memory, etc. Selection of a single entry is LogFilter.matches, order is LogCursor.compareTo.

Entries come in store order (LogCursor): by time, then by id, that is, in write order; reversed with newestFirst. A page continues from startAfter: in SQL that is WHERE (time, id) > (?, ?) ORDER BY time, id (< and DESC with newestFirst) instead of OFFSET, which would be shifted by entries written between pages.

Annotations
  • @immutable

Constructors

LogQuery({LogFilter filter = const LogFilter(), bool newestFirst = false, int? limit, LogCursor? startAfter})
const

Properties

filter → LogFilter
Which entries to select; all by default.
final
hashCode → int
The hash code for this object.
no setteroverride
limit → int?
At most this many entries per page; null means all.
final
newestFirst → bool
Newest first.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
startAfter → LogCursor?
Only entries strictly after this position in query order (older than it with newestFirst): the continuation of the previous page, usually the position of its last entry (StoredLogEntry.cursor). null means from the start.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startingAfter(LogCursor cursor) → LogQuery
The same query continuing the page after cursor: for LogPage.next.
toString() → String
A string representation of this object.
override

Operators

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