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

Support for metadata #49

Open
felixbuenemann opened this issue Apr 5, 2016 · 0 comments
Open

Support for metadata #49

felixbuenemann opened this issue Apr 5, 2016 · 0 comments

Comments

@felixbuenemann
Copy link
Collaborator

AMS allow to provide metadata, like number of total pages by passing the :meta key to render:

render json: posts, meta: { page:4, total_pages: 5 }

We could support this in postgres_ext-serializers by converting meta to JSON and selecting it as a ::json column in postgres via an additional CTE that can be joined to the final result.

Another approach would be to provide a way to generate meta data entirely in the database, which would be faster, but it would probably be harder to implement and less flexible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant