I am trying to create a database from a Java application running in Micronaut framework using jOOQ.
The code
contextSupplier.get().createDatabaseIfNotExists(this.databaseName).execute();
with a PostgreSQL datasource fails with:
org.jooq.exception.DataAccessException: SQL [do $$ begin create database "mydb"; exception when sqlstate '42P07' then null; end $$]; ERROR: CREATE DATABASE cannot run inside a transaction block
Is there a simple way to turn transactions off within jOOQ just for this statement?