SqliteAtAccessLog class

SQLite-backed AtAccessLog (access_log table). Insert-only verb / connection audit; seq is the rowid alias, so insertion order is id order.

Implemented types

Constructors

SqliteAtAccessLog(SqliteDatabase _db, {int compactionPercentage = 30})

Properties

compactionPercentage int
Percentage of oldest entries dropped per compaction pass.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<void>
Drops all rows (keeping the connection open) for test isolation.
close() Future<void>
Close the underlying storage handle.
override
compact(bool dryRun) Stream<int>
Compact the access log. If dryRun is true, yields each entry id that WOULD be removed without performing the deletion. If false, performs the compaction and yields each id as it is removed.
override
entriesCount() int
Total entry count. Used by operators / metrics; not on any hot path.
override
getLastAccessLogEntry() Future<AccessLogEntry>
Most-recent access-log entry, regardless of verb.
override
getLastPkamAccessLogEntry() Future<AccessLogEntry?>
Most-recent access-log entry whose verb is pkam.
override
getSize() int
Approximate on-disk size in bytes.
override
insert(String fromAtSign, String verbName, {String? lookupKey}) Future<int?>
Append a new entry recording that fromAtSign performed verbName (optionally against lookupKey) at the current instant. Returns the assigned entry id, or null on failure.
override
iterate() Stream<AccessLogEntry>
Iterate every access-log entry in insertion order. Used by the persistence migrator to copy access-log content from one backend to another.
override
mostVisitedAtSigns(int length) Future<Map<String, int>>
Top length atSigns by access-log entry count. Result map: atSign → visit count, ordered by descending count.
override
mostVisitedKeys(int length) Future<Map<String, int>>
Top length lookup keys by access-log entry count. Result map: lookup-key → visit count, ordered by descending count.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
replay(AccessLogEntry entry) Future<void>
Append entry verbatim, preserving its requestDateTime (unlike insert, which stamps the current instant). The keystore counterpart to iterate for the persistence migrator: replaying every iterated entry into a fresh backend reproduces the same insertion-ordered log.
override
toString() String
A string representation of this object.
inherited

Operators

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