MCPcopy Create free account
hub / github.com/cosdata/cosdata / open_cursor

Method open_cursor

src/models/buffered_io.rs:169–174  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

167 }
168
169 pub fn open_cursor(&self) -> Result<u64, BufIoError> {
170 let cursor_id = self.next_cursor_id.fetch_add(1, Ordering::SeqCst);
171 let mut cursors = self.cursors.write().map_err(|_| BufIoError::Locking)?;
172 cursors.insert(cursor_id, Cursor::new());
173 Ok(cursor_id)
174 }
175
176 // @DOUBT: The caller will need to remember to call close_cursor,
177 // other wise the cursors will keep accumulating. One way to

Callers 15

create_node_edgesFunction · 0.80
serializeMethod · 0.80
deserializeMethod · 0.80
test_basic_usageFunction · 0.80
test_writes_beyond_eofFunction · 0.80

Calls 1

insertMethod · 0.45