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

Group by with a JSON field #4053

Open
antham opened this issue May 14, 2024 · 0 comments
Open

Group by with a JSON field #4053

antham opened this issue May 14, 2024 · 0 comments

Comments

@antham
Copy link

antham commented May 14, 2024

Question

How it is possible to generate a group by statement related to a JSON field?
For an order by we get the sqljson package and we can do something like Order(sqljson.OrderValue(article.FieldMetadata, sqljson.Path("tag"))), considering metadata is a JSON object with a tagkey.
For the GroupBy I don't see how to do that easily, the only thing easy to do is to provide the whole field like that GroupBy(article.FieldMetadata).

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

No branches or pull requests

1 participant