Created
January 7, 2022 14:59
-
-
Save nkezhaya/db1f51edbba32367cca67be61f86b44a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule Query do | |
| def group_by_sets(query, %Form{show_total: true}), | |
| do: group_by(query, [o], fragment("GROUPING SETS ( (?), () )", o.id)) | |
| def group_by_sets(query, %Form{show_total: false}), | |
| do: group_by(query, [o], fragment("GROUPING SETS ( (?) )", o.id)) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment