package ch.hood;

import static ch.hood.jooq.schema1.Tables.A;
import static ch.hood.jooq.schema2.Tables.B;
import static org.jooq.impl.DSL.select;

public class App {
	public static void main(String[] args) {
		System.out.println(
			select(A.ID, A.FLAG)
				.from(A)
				.join(B).on(B.NAME.eq(A.NAME))
				.toString());
	}

}

@@ -50,164 +50,1727 @@
 ma1.
-Tables.A;%0Aimport static ch.hood.jooq.schema2.Tables.B;%0Aimport static org.jooq.impl.DSL.select;%0A%0Apublic class App %7B%0A%09public static void main(String%5B%5D args) %7B
+Schema1.SCHEMA1;%0Aimport static ch.hood.jooq.schema1.Tables.A;%0Aimport static ch.hood.jooq.schema2.Schema2.SCHEMA2;%0Aimport static ch.hood.jooq.schema2.Tables.B;%0Aimport static java.lang.Boolean.FALSE;%0Aimport static java.lang.Boolean.TRUE;%0Aimport static org.jooq.impl.DSL.select;%0A%0Aimport ch.hood.jooq.schema1.Schema1;%0Aimport ch.hood.jooq.schema2.Schema2;%0Aimport org.jooq.Configuration;%0Aimport org.jooq.DSLContext;%0Aimport org.jooq.SQLDialect;%0Aimport org.jooq.conf.MappedSchema;%0Aimport org.jooq.conf.RenderMapping;%0Aimport org.jooq.conf.RenderNameStyle;%0Aimport org.jooq.conf.Settings;%0Aimport org.jooq.impl.DSL;%0Aimport org.jooq.impl.DefaultConfiguration;%0A%0A/**%0A * The main methods expects either no arguments or 2 arguments. When run without arguments, we assume a HQSLDB;%0A * when run with 2 arguments, we expect the names of the schema1 and the schema2 for a Postgresql (or Oracle) instance.%0A */%0Apublic class App %7B%0A%09public static void main(String%5B%5D args) %7B%0A%09%09SQLDialect sqlDialect = args.length == 0 ? SQLDialect.HSQLDB : SQLDialect.POSTGRES; // SQLDialect.ORACLE%0A%0A%09%09Settings settings = new Settings()%0A%09%09%09.withRenderFormatted(true)%0A%09%09%09.withRenderSchema(TRUE)%0A%09%09%09.withRenderNameStyle(RenderNameStyle.UPPER);%0A%09%09if (sqlDialect == SQLDialect.POSTGRES) %7B%0A%09%09%09String schema1Name = args%5B0%5D;%0A%09%09%09String schema2Name = args%5B1%5D;%0A%09%09%09settings.withRenderMapping(new RenderMapping()%0A%09%09%09%09.withSchemata(%0A%09%09%09%09%09new MappedSchema().withInput(SCHEMA1.getName()).withOutput(schema1Name),%0A%09%09%09%09%09new MappedSchema().withInput(SCHEMA2.getName()).withOutput(schema2Name)));%0A%09%09%7D%0A%09%09%0A%09%09Configuration config = new DefaultConfiguration()%0A%09%09%09.set(sqlDialect)%0A%09%09%09.set(settings);%0A%0A%09%09Configuration configuration = config;%0A%09%09DSLContext dsl = DSL.using(configuration);%0A
 %0A%09%09S
@@ -1791,16 +1791,20 @@
 tln(%0A%09%09%09
+dsl.
 select(A

Add Code Example with Schema Mapping.