Skip to content

Generic Default for Cursor #231

@ya7010

Description

@ya7010

typing_extension.TypeVar can be used to specify the default Generic type, so the default for turu.core.cursor.Cursor should be defined as turu.core.cursor.Cursor[Never, Any].

GenericRowType defaults to Never because at the time of conn.cursor(), fetching does not retrieve any value and will cause an error at runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions