nilenso/honeysql-postgres

`over` not working as specified in the README

mping opened this issue · 1 comments

mping commented

This isn't working currently:

(-> (select :id)
    (psqlh/over
      [(sql/call :avg :salary) (-> (partition-by :department) (order-by [:designation])) :Average]
      [(sql/call :max :salary) :w :MaxSalary])
    (from :employee)
    (psqlh/window :w (psqlh/partition-by :department))
    sql/format)

=> ["SELECT id FROM employee  "]

Which is weird, because tests pass.

mping commented

Nvmind, it was because partition-by was being brough from core.