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

Method sql_limit

crates/stdlib/src/_sqlite3.rs:2912–2918  ·  view source on GitHub ↗
(self, len: usize, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

2910 }
2911
2912 fn sql_limit(self, len: usize, vm: &VirtualMachine) -> PyResult<()> {
2913 if len <= unsafe { sqlite3_limit(self.db, SQLITE_LIMIT_SQL_LENGTH, -1) } as usize {
2914 Ok(())
2915 } else {
2916 Err(new_data_error(vm, "query string is too large".to_owned()))
2917 }
2918 }
2919
2920 fn is_autocommit(self) -> bool {
2921 unsafe { sqlite3_get_autocommit(self.db) != 0 }

Callers 2

executescriptMethod · 0.80
newMethod · 0.80

Calls 2

ErrClass · 0.50
to_ownedMethod · 0.45

Tested by

no test coverage detected