MapstedDb

open class MapstedDb

Container of the SQLite instance as a Singleton.

Constructors

Link copied to clipboard
constructor(@NonNull context: Context, @NonNull coreApi: CoreApi)
constructor(@NonNull context: Context, @NonNull coreApi: CoreApi, @NonNull extraTables: List<IMapstedTable>)

Types

Link copied to clipboard
interface Provider
Interface for providing a MapstedDb instance

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open fun consumeBuildingPrefetch(buildingId: Int): PropertyDataResult
Returns and atomically removes the prefetched result for buildingId.
Link copied to clipboard
open fun ensureSchema()
Ensure the table schema is present and queryable before critical reads/writes.
Link copied to clipboard
open fun getDb(): SQLiteDatabase
Returns the instance of the database.
Link copied to clipboard
Link copied to clipboard
open fun invalidateBuildingPrefetch(buildingId: Int)
Drop any cached entry for buildingId.
Link copied to clipboard
open fun prefetchBuilding(buildingId: Int)
Fill the prefetch cache for buildingId by running the standard getPropertyDataResult read on the calling thread.
Link copied to clipboard
Test/diagnostic helper.
Link copied to clipboard
Round 25 diagnostic: snapshot the prefetch effectiveness counters as a single human-readable string (fills/hits/misses/invalidations).
Link copied to clipboard
Round 25 diagnostic: zero out fills/hits/misses/invalidations so the next plot starts from a clean baseline.