Fork me on GitHub
#honeysql
<
2023-02-24
>
p-himik14:02:40

Is there a better way to CAST(... AS INTEGER[]) than using [:raw "integer[]"]? Tried [:array :integer] and got yelled at:

Execution error (ExceptionInfo) at honey.sql/format-expr-list (sql.cljc:480).
format-expr-list expects a sequence of expressions, found: class clojure.lang.Keyword

seancorfield17:02:28

Probably not. Feel free to open an issue with a link to whatever DB docs describes that.

p-himik14:02:20

Another question - is there a way to generate ARRAY_AGG(x ORDER BY a ASC, b DESC)?

seancorfield17:02:47

Hmm, pretty sure there isn't. Create an issue with a link to the DB docs that describe that syntax and I'll take a look. It probably needs special syntax added for that sort of thing.