Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/storage/ReadOnlyTabularStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import type {
FromSchema,
InsertEntity,
ITabularStorage,
JoinedRow,
JoinSpec,
JoinType,
Page,
PageRequest,
QueryOptions,
Expand Down Expand Up @@ -121,6 +124,17 @@ export class ReadOnlyTabularStorage<
return this.inner.queryIndex(criteria, options);
}

/**
* A join is a read, so it forwards like every other read here. The write
* guard this wrapper exists for is unaffected: nothing in a join mutates.
*/
join<R, T extends JoinType>(
spec: JoinSpec<Entity, R, T>,
right: ITabularStorage<any, any, R, any, any>
): Promise<JoinedRow<Entity, R, T>[]> {
return this.inner.join(spec, right);
}

// ── transactions (no-op wrapper) ───────────────────────────────────
// Run `fn` against this read-only wrapper so writes inside continue to
// no-op; reads still hit the underlying storage. No real DB transaction
Expand Down