postgrest-docs
postgrest-docs copied to clipboard
Include generated query in the API
Besides the generated query, we can also include the recommended indexes.
I think the way to do this would be:
- Create unit tests for the
PostgREST.Query.Statementsmodule 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.
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
If we do the application/sql feature(mentioned in https://github.com/PostgREST/postgrest/issues/2354#issue-1287975919), unit tests would not be needed. We'd just include the application/sql output next to the request in the docs.