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

APIv2: macros, SQL cleanup #4286

Merged
merged 13 commits into from
Jul 3, 2024
Merged

APIv2: macros, SQL cleanup #4286

merged 13 commits into from
Jul 3, 2024

Conversation

macobo
Copy link
Contributor

@macobo macobo commented Jun 28, 2024

Cleanup PR.

QueryBuilder requires selected fields to be aliased via both field names passed to select_merge as well as setting selected_as. This PR introduces utility macros to reduce this sort of boilerplate.

It also moves more code under Plausible.Stats.SQL

@macobo macobo requested a review from ukutaht June 28, 2024 04:24
@macobo macobo changed the title APIv2: select_merge_as macro APIv2: macros, SQL cleanup Jun 28, 2024
@macobo macobo force-pushed the apiv2-breakdown-module-remove branch from 139e3ee to eac23c8 Compare June 28, 2024 06:45
@macobo macobo force-pushed the select_merge_as branch 2 times, most recently from 48aef7e to 9c8d16f Compare June 28, 2024 12:47
Base automatically changed from apiv2-breakdown-module-remove to master July 1, 2024 06:27
lib/plausible/stats/sql/fragments.ex Outdated Show resolved Hide resolved
@macobo macobo merged commit 05ac840 into master Jul 3, 2024
10 checks passed
@macobo macobo deleted the select_merge_as branch July 3, 2024 13:32
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

Successfully merging this pull request may close these issues.

2 participants