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
16 changes: 16 additions & 0 deletions crates/bindings/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1252,6 +1252,14 @@ pub trait DbContext {
fn db(&self) -> &Self::DbView;
}

impl DbContext for AnonymousViewContext {
type DbView = LocalReadOnly;

fn db(&self) -> &Self::DbView {
&self.db
}
}

impl DbContext for ReducerContext {
type DbView = Local;

Expand All @@ -1269,6 +1277,14 @@ impl DbContext for TxContext {
}
}

impl DbContext for ViewContext {
type DbView = LocalReadOnly;

fn db(&self) -> &Self::DbView {
&self.db
}
}

// `ProcedureContext` is *not* a `DbContext`
// but a `TxContext` derived from it is.

Expand Down