beanquery icon indicating copy to clipboard operation
beanquery copied to clipboard

Rename `ACCOUNT_SORTKEY()` to `REPORD()`

Open dnicolodi opened this issue 8 months ago • 0 comments

Quoting TODO.md

Rename ACCOUNT_SORTKEY(), it's a terrible name. Name this REPORD() for "report order".

I'm not sure REPORD() is much better. Another option is to introduce an ACCOUNT() function that turns an account name into an account object and have account objects compare in a way that results in the desired ordering. However,

SELECT
  account,
  sum(position)
GROUP BY
  account
ORDER BY
  account(account)

does not look very nice or intuitive.

dnicolodi avatar Jun 15 '24 21:06 dnicolodi