Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Include generated query in the API #528

Open
steve-chavez opened this issue Apr 25, 2022 · 3 comments
Open

Include generated query in the API #528

steve-chavez opened this issue Apr 25, 2022 · 3 comments
Labels
references Technical reference.

Comments

@steve-chavez
Copy link
Member

Besides the generated query, we can also include the recommended indexes.

@steve-chavez steve-chavez added the references Technical reference. label Apr 25, 2022
@steve-chavez
Copy link
Member Author

steve-chavez commented May 6, 2022

I think the way to do this would be:

  • Create unit tests for the PostgREST.Query.Statements module in core.
  • Copy/Paste the result of the tests on the docs - which are the generated queries
  • If the queries do change in core, the resulting unit tests would fail - so that would let us know when to update the docs as well.

@steve-chavez
Copy link
Member Author

What I like about this:

  • Increasing overall code quality - more unit tests
  • If maintenance turns out to be high, it would force us to merge docs with core

@steve-chavez
Copy link
Member Author

steve-chavez commented Jun 29, 2022

If we do the application/sql feature(mentioned in PostgREST/postgrest#2354 (comment)), unit tests would not be needed. We'd just include the application/sql output next to the request in the docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
references Technical reference.
Development

No branches or pull requests

1 participant