Skip to content

Add query parameter limit #644

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

Merged
merged 3 commits into from
Jul 2, 2024
Merged

Add query parameter limit #644

merged 3 commits into from
Jul 2, 2024

Conversation

grieve54706
Copy link
Contributor

@grieve54706 grieve54706 commented Jul 1, 2024

Add new query parameter limit for query API to limit data size.

POST /v2/ibis/{data_source}/query?limit=1

@@ -27,12 +27,15 @@ def query(
data_source: DataSource,
dto: QueryDTO,
dry_run: Annotated[bool, Query(alias="dryRun")] = False,
limit: int = 100,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the default value could be unlimit. It can also be used by the user who want to get all result.

Copy link
Contributor

@goldmedal goldmedal left a comment

Choose a reason for hiding this comment

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

Thanks @grieve54706. LGTM.

@goldmedal goldmedal merged commit fc262ce into main Jul 2, 2024
4 checks passed
@goldmedal goldmedal deleted the feature/query-limit branch July 2, 2024 04:36
grieve54706 added a commit that referenced this pull request Dec 13, 2024
* Add query parameter limit

* Make limit not with default

* Add test case
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.

2 participants