honeysql

sheluchin 2024-05-29T17:19:04.885549Z

How would you do CREATE TYPE foo_enum AS ENUM ('bar', 'baz') using HoneySQL? Is there a docs section that explains this?

seancorfield 2024-05-29T17:21:36.785869Z

There is no support for that. DDL is so irregular that it is hard to support in general and a lot of it is very database-specific. I have implemented some widely-used and fairly portable stuff but it's just too hard to implement everything -- especially when I don't use PostgreSQL (or MS SQL Server) so I'm not familiar with their syntax. I'm also not keen on accepting PRs for some of these features because that then places a future maintenance burden on me to support and potentially enhance a syntax I do not use or even know.

sheluchin 2024-05-29T17:24:47.107189Z

That's great, thank you for the clear answer. Totally understandable that you don't want to cover every edge case out there. I'll just use a string for this instead.

sheluchin 2024-05-29T17:26:37.093099Z

For some reason I thought in the back of my mind that HoneySQL provides an escape hatch of sorts for producing unusual queries that it doesn't have native support for.

seancorfield 2024-05-29T18:19:33.493969Z

Well, :raw, but then you're just back to strings 🙂