I need to cast a table name to object identifier using JOOQ. In plain SQL I would do:
'my_table'::regclass::oid
I couldn't find a DataType for casting the value (It exists a PostgresDataType.OID, but not a PostgresDataType.REGCLASS or something similar, also using PostgresDataType directly is deprecated).
I also played with DSL.inline, DSL.val, but can't obtain the desired output.
UPDATE
I realized there's a PostgresDSL.oid that returns Field<Long> and produces following output "my_table".oid, but I don't have a reference for the table (I have the table name as text), so it's not valid for my use case.
Is there a way to cast a table name to Postgres Object Identifier (OID) throught JOOQ?