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

feat: support function fetchmany() and fetchall() in python SDK and UT #1215

Merged
merged 9 commits into from
Feb 15, 2022
Merged

Conversation

HuilinWu2
Copy link
Collaborator

@HuilinWu2 HuilinWu2 commented Feb 14, 2022

Reference: Standard DBAPI
*.fetchone()
Fetch the next row of a query result set, returning a single sequence, None when no more data is available.

*.fetchmany(size=None)
Fetch the next set of rows of a query result, returning a sequence of sequences (e.g. a list of tuples). An empty sequence is returned when no more rows are available.
The number of rows to fetch per call is specified by the parameter. If it is not given, the cursor's arraysize determines the number of rows to be fetched.

*.fetchall()
Fetch all (remaining) rows of a query result, returning them as a sequence of sequences (e.g. a list of tuples).

@HuilinWu2 HuilinWu2 added the enhancement New feature or request label Feb 14, 2022
@HuilinWu2 HuilinWu2 added this to the v0.5 milestone Feb 14, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 14, 2022

Linux Test Report

  49 files    49 suites   3m 48s ⏱️
122 tests 119 ✔️ 3 💤 0
151 runs  148 ✔️ 3 💤 0

Results for commit ef984c8.

♻️ This comment has been updated with latest results.

python/openmldb/dbapi/dbapi.py Outdated Show resolved Hide resolved
python/openmldb/dbapi/dbapi.py Outdated Show resolved Hide resolved
python/openmldb/dbapi/dbapi.py Show resolved Hide resolved
@vagetablechicken vagetablechicken enabled auto-merge (squash) February 15, 2022 08:18
Copy link
Collaborator

@tobegit3hub tobegit3hub left a comment

Choose a reason for hiding this comment

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

LGTM

@vagetablechicken vagetablechicken merged commit e2e916b into 4paradigm:main Feb 15, 2022
@lumianph lumianph mentioned this pull request Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Throw exception if fetchone fail in Python SDK Support fetchmany and fetchall in Python SDK
3 participants