MCPcopy Index your code
hub / github.com/RustPython/RustPython / ensure_connection_open

Method ensure_connection_open

crates/stdlib/src/_sqlite3.rs:2355–2364  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

2353 }
2354
2355 fn ensure_connection_open(&self, vm: &VirtualMachine) -> PyResult<()> {
2356 if self.connection.is_closed() {
2357 Err(new_programming_error(
2358 vm,
2359 "Cannot operate on a closed database".to_owned(),
2360 ))
2361 } else {
2362 Ok(())
2363 }
2364 }
2365
2366 #[pymethod]
2367 fn read(

Callers 8

readMethod · 0.80
writeMethod · 0.80
tellMethod · 0.80
seekMethod · 0.80
__enter__Method · 0.80
__exit__Method · 0.80
subscriptMethod · 0.80
ass_subscriptMethod · 0.80

Calls 3

ErrClass · 0.50
is_closedMethod · 0.45
to_ownedMethod · 0.45

Tested by

no test coverage detected