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

Method begin_transaction

crates/stdlib/src/_sqlite3.rs:2944–2957  ·  view source on GitHub ↗
(
            self,
            isolation_level: Option<PyStrRef>,
            vm: &VirtualMachine,
        )

Source from the content-addressed store, hash-verified

2942 }
2943
2944 fn begin_transaction(
2945 self,
2946 isolation_level: Option<PyStrRef>,
2947 vm: &VirtualMachine,
2948 ) -> PyResult<()> {
2949 let Some(isolation_level) = isolation_level else {
2950 return Ok(());
2951 };
2952 let mut s = Vec::with_capacity(16);
2953 s.extend(b"BEGIN ");
2954 s.extend(isolation_level.expect_str().bytes());
2955 s.push(b'\0');
2956 self._exec(&s, vm)
2957 }
2958
2959 fn interrupt(self) {
2960 unsafe { sqlite3_interrupt(self.db) }

Callers 2

executeMethod · 0.80
executemanyMethod · 0.80

Calls 5

expect_strMethod · 0.80
extendMethod · 0.45
bytesMethod · 0.45
pushMethod · 0.45
_execMethod · 0.45

Tested by

no test coverage detected