(
context: SqliteContext,
instance: &PyObject,
name: &str,
vm: &VirtualMachine,
)
| 616 | } |
| 617 | |
| 618 | fn callback_result_from_method( |
| 619 | context: SqliteContext, |
| 620 | instance: &PyObject, |
| 621 | name: &str, |
| 622 | vm: &VirtualMachine, |
| 623 | ) { |
| 624 | let f = || -> PyResult<()> { |
| 625 | let val = vm.call_method(instance, name, ())?; |
| 626 | context.result_from_object(&val, vm) |
| 627 | }; |
| 628 | |
| 629 | if let Err(exc) = f() { |
| 630 | if exc.fast_isinstance(vm.ctx.exceptions.attribute_error) { |
| 631 | context.result_exception( |
| 632 | vm, |
| 633 | exc, |
| 634 | &format!("user-defined aggregate's '{name}' method not defined\0"), |
| 635 | ) |
| 636 | } else { |
| 637 | context.result_exception( |
| 638 | vm, |
| 639 | exc, |
| 640 | &format!("user-defined aggregate's '{name}' method raised error\0"), |
| 641 | ) |
| 642 | } |
| 643 | } |
| 644 | } |
| 645 | |
| 646 | fn call_method_with_args( |
| 647 | context: SqliteContext, |
nothing calls this directly
no test coverage detected