-
Notifications
You must be signed in to change notification settings - Fork 3
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
The functions from postgrest.sql
are not very reusable
#35
Comments
Another idea is to merge This is also convenient since |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The function
postgrest_get_all_tables
in particular, returnscolumns
as a JSONB object, using functions fromopenapi.sql
.postgrest-openapi/sql/postgrest.sql
Lines 5 to 18 in b5827bf
I think the returning table should be normalized (by
columns
and its properties, not a JSONB object) and not useopenapi.sql
functions if necessary. Then we could use an intermediate function(s) to convert to different OpenAPI objects. This function could be the one called (instead ofpostgrest_get_all_tables
) by other modules to build parameters, schemas, etc.This would make it easier to reuse and even more performant (does not need to unnest or keep repeating unnecessary queries).
The text was updated successfully, but these errors were encountered: