use of org.jooq.Schema in project jOOQ by jOOQ.
the class TableImpl method accept0.
private void accept0(Context<?> ctx) {
if (ctx.qualify() && (!asList(POSTGRES).contains(ctx.family()) || parameters == null || ctx.declareTables())) {
Schema mappedSchema = Tools.getMappedSchema(ctx.configuration(), getSchema());
if (mappedSchema != null) {
ctx.visit(mappedSchema);
ctx.sql('.');
}
}
ctx.literal(Tools.getMappedTable(ctx.configuration(), this).getName());
if (parameters != null && ctx.declareTables()) {
// [#2925] Some dialects don't like empty parameter lists
if (ctx.family() == FIREBIRD && parameters.length == 0)
ctx.visit(new QueryPartList<Field<?>>(parameters));
else
ctx.sql('(').visit(new QueryPartList<Field<?>>(parameters)).sql(')');
}
}
use of org.jooq.Schema in project jOOQ by jOOQ.
the class Tools method getMappedUDTName.
/**
* Map an {@link ArrayRecord} according to the configured {@link org.jooq.SchemaMapping}
*/
static final String getMappedUDTName(Configuration configuration, UDTRecord<?> record) {
UDT<?> udt = record.getUDT();
Schema mapped = getMappedSchema(configuration, udt.getSchema());
StringBuilder sb = new StringBuilder();
if (mapped != null)
sb.append(mapped.getName()).append('.');
sb.append(record.getUDT().getName());
return sb.toString();
}
Aggregations