MCPcopy Create free account
hub / github.com/hashintel/hash / Read

Interface Read

libs/@local/graph/store/src/query/mod.rs:95–123  ·  view source on GitHub ↗

Read access to a store.

Source from the content-addressed store, hash-verified

93
94/// Read access to a store.
95pub trait Read<R: QueryRecord>: Sync {
96 type ReadStream: Stream<Item = Result<R, Report<QueryError>>> + Send + Sync;
97
98 fn read(
99 &self,
100 filters: &[Filter<'_, R>],
101 temporal_axes: Option<&QueryTemporalAxes>,
102 include_drafts: bool,
103 ) -> impl Future<Output = Result<Self::ReadStream, Report<QueryError>>> + Send;
104
105 #[tracing::instrument(level = "info", skip(self, filters))]
106 fn read_vec(
107 &self,
108 filters: &[Filter<'_, R>],
109 temporal_axes: Option<&QueryTemporalAxes>,
110 include_drafts: bool,
111 ) -> impl Future<Output = Result<Vec<R>, Report<QueryError>>> + Send {
112 self.read(filters, temporal_axes, include_drafts)
113 .and_then(TryStreamExt::try_collect)
114 .in_current_span()
115 }
116
117 fn read_one(
118 &self,
119 filters: &[Filter<'_, R>],
120 temporal_axes: Option<&QueryTemporalAxes>,
121 include_drafts: bool,
122 ) -> impl Future<Output = Result<R, Report<QueryError>>> + Send;
123}
124
125// TODO: Add remaining CRUD traits

Callers 11

walk_graphFunction · 0.85
fold_intrinsicMethod · 0.85
visit_graph_read_bodyMethod · 0.85
walk_projectionFunction · 0.85
walk_placeFunction · 0.85
walk_operandFunction · 0.85
walk_graph_read_bodyFunction · 0.85
walk_projectionFunction · 0.85
walk_placeFunction · 0.85
walk_operandFunction · 0.85
walk_graph_read_bodyFunction · 0.85

Implementers 2

store.rslibs/@local/graph/type-fetcher/src/sto
crud.rslibs/@local/graph/postgres-store/src/s

Calls

no outgoing calls

Tested by

no test coverage detected