Available in versions: Dev (3.19)
This documentation is for the unreleased development version of jOOQ. Click on the above version links to get this documentation for a supported version of jOOQ.
CREATE TYPE .. AS OBJECT
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
jOOQ supports creating standard SQL composite types
// Create a new ENUM type create.createType("point") .as(field("x", INTEGER), field("y", INTEGER)) .execute();
Dialect support
This example using jOOQ:
createType("point").as(field("x", INTEGER), field("y", INTEGER))
Translates to the following dialect specific expressions:
-- AURORA_POSTGRES, POSTGRES, YUGABYTEDB CREATE TYPE point AS ( x int, y int ) -- COCKROACHDB CREATE TYPE point AS ( x int4, y int4 ) -- ORACLE CREATE TYPE point AS OBJECT ( x number(10), y number(10) ) -- ACCESS, ASE, AURORA_MYSQL, BIGQUERY, DB2, DERBY, DUCKDB, EXASOL, FIREBIRD, H2, HANA, HSQLDB, INFORMIX, MARIADB, MEMSQL, -- MYSQL, REDSHIFT, SNOWFLAKE, SQLDATAWAREHOUSE, SQLITE, SQLSERVER, SYBASE, TERADATA, TRINO, VERTICA /* UNSUPPORTED */
(These are currently generated with jOOQ 3.19, see #10141), or translate your own on our website
Feedback
Do you have any feedback about this page? We'd love to hear it!