Skip to content
This repository has been archived by the owner on Jul 29, 2020. It is now read-only.

Group function alias names #53

Merged
merged 2 commits into from
Jun 24, 2020

Conversation

octaviancorlade
Copy link
Contributor

The current output when an aggregate function is used multiple times in a query looks like this and makes it impossible to distinguish the columns

[
    {
        "column1": "abc",
        "sum": 10,
        "sum": 20,
    }
]

This enables the syntax _select=column1,sum:column2:alias2,sum:column3:alias3&_groupby=column1 to return

[
    {
        "column1": "abc",
        "alias2": 10,
        "alias3": 20,
    }
]

Also related to prest/prest#216

Signed-off-by: Octavian R. Corlade <octavian.corlade@gmail.com>
Signed-off-by: Octavian R. Corlade <octavian.corlade@gmail.com>
@sourcelevel-bot
Copy link

Hello, @octaviancorlade! This is your first Pull Request that will be reviewed by SourceLevel, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.

@tiaguinho
Copy link
Member

@avelino can you check?

@avelino avelino merged commit fe782dc into prest:master Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants