Skip to content

Interface: CommentsStorageAdapter

@roomful/core


@roomful/core / 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.

load(): Promise<readonly CommentThread[]>

Defined in: packages/core/src/engines/comments-storage.ts:18

Returns the persisted threads for the room (empty when there are none).

Promise<readonly CommentThread[]>

The stored threads.


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.

readonly CommentThread[]

The current threads to persist.

Promise<void>

A promise that resolves once the write completes.