MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / read_session

Method read_session

nodedb/src/control/server/pgwire/session/store.rs:179–186  ·  view source on GitHub ↗

Access the session map with a read lock for use by other session submodules.

(
        &self,
        addr: &SocketAddr,
        f: impl FnOnce(&PgSession) -> R,
    )

Source from the content-addressed store, hash-verified

177
178 /// Access the session map with a read lock for use by other session submodules.
179 pub(super) fn read_session<R>(
180 &self,
181 addr: &SocketAddr,
182 f: impl FnOnce(&PgSession) -> R,
183 ) -> Option<R> {
184 let sessions = self.sessions.read().unwrap_or_else(|p| p.into_inner());
185 sessions.get(addr).map(f)
186 }
187
188 /// Access the session map with a write lock for use by other session submodules.
189 pub(super) fn write_session<R>(

Callers 11

has_temp_tableMethod · 0.80
temp_table_namesMethod · 0.80
get_sql_preparedMethod · 0.80
get_parameterMethod · 0.80
all_parametersMethod · 0.80
listen_channelMethod · 0.80
listen_channelsMethod · 0.80
transaction_stateMethod · 0.80
snapshot_lsnMethod · 0.80

Calls 2

readMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected