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 array_agg queries #80

Open
jcsturges opened this issue Jan 26, 2021 · 0 comments
Open

Support for array_agg queries #80

jcsturges opened this issue Jan 26, 2021 · 0 comments

Comments

@jcsturges
Copy link

Love this project @jeremydaly !!!

I have a set of queries where I join 2-3 tables together and rely on the built-in PostgreSQL functions for array_agg to collect array properties. This doesn't appear to be supported yet but it would be awesome if the result set parser could handle this.

Example query:

SELECT users.id, array_agg(memberships.id) AS audienceIds
FROM users
LEFT OUTER JOIN memberships ON users.id = memberships.user_id
GROUP BY users.id

Returns:

{ "id": 1, "audienceIds": { "longValues": [1, 2, 3] } }

Expected:

{ "id": 1, "audienceIds": [1, 2, 3] }

I'm working on a pretty meaty project for the next few weeks but if I free up I'm happy attempt a PR. Seems like it should be relatively simple.

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