Interface: CommentsStorageAdapter
@roomful/core / CommentsStorageAdapter
Interface: CommentsStorageAdapter
Section titled “Interface: CommentsStorageAdapter”Defined in: packages/core/src/engines/comments-storage.ts:12
A room-scoped persistence backend for comment threads.
The comments engine calls load once on startup to restore threads into an empty room, and
save after every change with the full thread list. Back it with Postgres, SQLite, Redis,
a file, or any durable store — see docs/reference/comments-storage.md.
Methods
Section titled “Methods”load()
Section titled “load()”load():
Promise<readonlyCommentThread[]>
Defined in: packages/core/src/engines/comments-storage.ts:18
Returns the persisted threads for the room (empty when there are none).
Returns
Section titled “Returns”Promise<readonly CommentThread[]>
The stored threads.
save()
Section titled “save()”save(
threads):Promise<void>
Defined in: packages/core/src/engines/comments-storage.ts:27
Persists the full thread list. Called after every mutation; an implementation may upsert or diff internally.
Parameters
Section titled “Parameters”threads
Section titled “threads”readonly CommentThread[]
The current threads to persist.
Returns
Section titled “Returns”Promise<void>
A promise that resolves once the write completes.