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

Method columns_description

crates/stdlib/src/_sqlite3.rs:3255–3281  ·  view source on GitHub ↗
(
            self,
            detect_types: i32,
            vm: &VirtualMachine,
        )

Source from the content-addressed store, hash-verified

3253 }
3254
3255 fn columns_description(
3256 self,
3257 detect_types: i32,
3258 vm: &VirtualMachine,
3259 ) -> PyResult<Option<PyTupleRef>> {
3260 if self.column_count() == 0 {
3261 return Ok(None);
3262 }
3263 let columns = self
3264 .columns_name(detect_types, vm)?
3265 .into_iter()
3266 .map(|s| {
3267 vm.ctx
3268 .new_tuple(vec![
3269 s.into(),
3270 vm.ctx.none(),
3271 vm.ctx.none(),
3272 vm.ctx.none(),
3273 vm.ctx.none(),
3274 vm.ctx.none(),
3275 vm.ctx.none(),
3276 ])
3277 .into()
3278 })
3279 .collect();
3280 Ok(Some(vm.ctx.new_tuple(columns)))
3281 }
3282
3283 fn busy(self) -> bool {
3284 unsafe { sqlite3_stmt_busy(self.st) != 0 }

Callers 2

executeMethod · 0.80
executemanyMethod · 0.80

Calls 7

column_countMethod · 0.80
collectMethod · 0.80
columns_nameMethod · 0.80
SomeClass · 0.50
mapMethod · 0.45
into_iterMethod · 0.45
new_tupleMethod · 0.45

Tested by

no test coverage detected