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 support to aggregate multiple queries into a single response #17

Open
1 of 5 tasks
php-coder opened this issue Sep 11, 2022 · 1 comment
Open
1 of 5 tasks
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@php-coder
Copy link
Owner

php-coder commented Sep 11, 2022

It should be possible to return a multiple members where each of them are came from different queries.

  • python support
  • golang support
  • javascript support
  • add documentation
  • add tests
@php-coder php-coder added the enhancement New feature or request label Sep 11, 2022
@php-coder
Copy link
Owner Author

php-coder commented Sep 11, 2022

Example of a response:

{
  "num_of_categories": 5,
  "num_of_countries": 10
  "num_of_series": 100
}

And possible syntax:

- path: /v1/stat
  get:
    queries:
      num_of_categories: SELECT COUNT(*) FROM categories
      num_of_countries:  SELECT COUNT(*) FROM countries
      num_of_series:     SELECT COUNT(*) FROM series

OR

- path: /v1/stat
  get:
    aggregated_query:
      num_of_categories: SELECT COUNT(*) FROM categories
      num_of_countries:  SELECT COUNT(*) FROM countries
      num_of_series:     SELECT COUNT(*) FROM series

OR

- path: /v1/stat
  get:
    query:
      aggregate:
        num_of_categories: SELECT COUNT(*) FROM categories
        num_of_countries:  SELECT COUNT(*) FROM countries
        num_of_series:     SELECT COUNT(*) FROM series

@php-coder php-coder self-assigned this Sep 29, 2022
@php-coder php-coder added this to the 0.0.3 milestone Sep 29, 2022
php-coder added a commit that referenced this issue Sep 29, 2022
@php-coder php-coder modified the milestones: 0.0.3, 0.0.4 Apr 9, 2024
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

No branches or pull requests

1 participant