Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rowcount property for Python cursor objects #8911

Merged
merged 10 commits into from
Sep 15, 2023

Conversation

hannes
Copy link
Member

@hannes hannes commented Sep 13, 2023

as the law has commanded

Copy link
Member

@Mause Mause left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah, that'll do it yeah 😁

tools/pythonpkg/tests/fast/api/test_dbapi10.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Tishj Tishj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, we can extend this with actual logic whenever, for now just having the method reduces the threshold for that 👍

@Tishj
Copy link
Contributor

Tishj commented Sep 13, 2023

Ah I think you ran regenerate_python_stubs.sh, which should probably be deleted actually
It breaks all the manual changes made, instead we just modify the stubs manually

I think you instead just want to add:

rowcount: int

To the list in duckdb-stubs/__init__pyi that contains:

apilevel: str
comment: token_type
default_connection: DuckDBPyConnection
identifier: token_type
keyword: token_type
numeric_const: token_type
operator: token_type
paramstyle: str
string_const: token_type
threadsafety: int

@github-actions github-actions bot marked this pull request as draft September 13, 2023 12:59
@hannes hannes marked this pull request as ready for review September 13, 2023 13:22
@github-actions github-actions bot marked this pull request as draft September 13, 2023 14:12
@Mytherin Mytherin marked this pull request as ready for review September 13, 2023 14:14
@github-actions github-actions bot marked this pull request as draft September 15, 2023 07:51
@hannes hannes marked this pull request as ready for review September 15, 2023 08:30
@github-actions github-actions bot marked this pull request as draft September 15, 2023 13:27
@hannes hannes marked this pull request as ready for review September 15, 2023 13:28
@Mytherin Mytherin merged commit 38c6e8c into duckdb:main Sep 15, 2023
15 checks passed
@hannes hannes deleted the pythonrowcount branch February 16, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants