Generate a row factory calling `!func` with positional parameters for every row. :param func: The function to call for each row. It must support the fields returned by the query as positional arguments.
(func: Callable[..., T])
| 170 | |
| 171 | |
| 172 | def args_row(func: Callable[..., T]) -> BaseRowFactory[T]: |
| 173 | """Generate a row factory calling `!func` with positional parameters for every row. |
| 174 | |
| 175 | :param func: The function to call for each row. It must support the fields |
| 176 | returned by the query as positional arguments. |
| 177 | """ |
| 178 | |
| 179 | def args_row_(cur: BaseCursor[Any, T]) -> RowMaker[T]: |
| 180 | def args_row__(values: Sequence[Any]) -> T: |
| 181 | return func(*values) |
| 182 | |
| 183 | return args_row__ |
| 184 | |
| 185 | return args_row_ |
| 186 | |
| 187 | |
| 188 | def kwargs_row(func: Callable[..., T]) -> BaseRowFactory[T]: |
no outgoing calls
no test coverage detected