Skip to Content
Motoko

The store

durableObjectStore(storage, scope, { prefix }), the default, is pi-durable's SQLite storage on the object's own database (openDurableObjectSqliteStorage), its tables under prefix (motoko_ by default, never _cf_, which Durable Objects reserve), apart from the SDK's cf_agents_* and the app's. It serves scope alone and refuses every other with a TypeError. Its lease is held in the object's memory: the platform runs one instance of an object at a time, so the one writer it admits is the only one.

Its erase runs eraseConversations of @chia1104/motoko-core/sqlite in one transaction on the object's database. The object's SQL API refuses PRAGMA secure_delete and PRAGMA wal_checkpoint (SQLITE_AUTH), so the erased rows are deleted but not overwritten: their bytes may stay in free pages until SQLite reuses them, which the object can neither check nor change. The runtime erases deleted sessions when the instance closes, and eviction closes nothing, so set closeIdleAfterMs to have them erased while the object lives.

A store of the app's own takes the default's place; the object's alarm stays the wake-up.