Is there any sort of extension that would allow me to use Postgres ltrees in JOOQ without having to use raw SQL?
Any way to make one myself maybe?
You have to implement a custom data type binding (
org.jooq.Binding) and apply that to your generated code: https://www.jooq.org/doc/latest/manual/code-generation/custom-data-type-bindings.
Binding allows you to tell jOOQ how to:
?::ltreein your case)
SQLOutput(optional, when your type is contained in a UDT, currently only in Oracle)
CallableStatement(optional, when you fetch it from a function
SQLInput(optional, when your type is contained in a UDT, currently only in Oracle)