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

Method __exit__

crates/stdlib/src/_sqlite3.rs:1471–1483  ·  view source on GitHub ↗
(
            &self,
            cls: PyObjectRef,
            exc: PyObjectRef,
            tb: PyObjectRef,
            vm: &VirtualMachine,
        )

Source from the content-addressed store, hash-verified

1469
1470 #[pymethod]
1471 fn __exit__(
1472 &self,
1473 cls: PyObjectRef,
1474 exc: PyObjectRef,
1475 tb: PyObjectRef,
1476 vm: &VirtualMachine,
1477 ) -> PyResult<()> {
1478 if vm.is_none(&cls) && vm.is_none(&exc) && vm.is_none(&tb) {
1479 self.commit(vm)
1480 } else {
1481 self.rollback(vm)
1482 }
1483 }
1484
1485 #[pygetset]
1486 fn isolation_level(&self) -> Option<PyStrRef> {

Callers

nothing calls this directly

Calls 6

commitMethod · 0.80
rollbackMethod · 0.80
is_noneMethod · 0.45
innerMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected