[jOOQ/jOOQ#13764] Refactor internal schema mapping logic to use the new QualifiedImpl type
This commit is contained in:
parent
f9b777f5ea
commit
9fe180919c
@ -140,9 +140,6 @@ package org.jooq.impl;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -113,9 +113,6 @@ package org.jooq.impl;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.SQLDialect.CUBRID;
|
||||
import static org.jooq.impl.Tools.getMappedSchema;
|
||||
|
||||
import org.jooq.Catalog;
|
||||
@ -63,13 +64,16 @@ final class QualifiedImpl extends AbstractNamed implements Qualified, UTransient
|
||||
// XXX: QueryPart
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public final void accept(Context<?> ctx) {
|
||||
Schema mappedSchema = getMappedSchema(ctx, getSchema());
|
||||
static final void acceptMappedSchemaPrefix(Context<?> ctx, Schema schema) {
|
||||
Schema mappedSchema = getMappedSchema(ctx, schema);
|
||||
|
||||
if (mappedSchema != null && !"".equals(mappedSchema.getName()))
|
||||
ctx.visit(mappedSchema).sql('.');
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void accept(Context<?> ctx) {
|
||||
acceptMappedSchemaPrefix(ctx, getSchema());
|
||||
ctx.visit(getUnqualifiedName());
|
||||
}
|
||||
|
||||
|
||||
@ -343,11 +343,7 @@ implements
|
||||
|
||||
|
||||
|
||||
Schema mappedSchema = getMappedSchema(ctx, schema);
|
||||
|
||||
if (mappedSchema != null && !"".equals(mappedSchema.getName()) && ctx.family() != CUBRID)
|
||||
ctx.visit(mappedSchema)
|
||||
.sql('.');
|
||||
QualifiedImpl.acceptMappedSchemaPrefix(ctx, getSchema());
|
||||
|
||||
if (nameIsPlainSQL)
|
||||
ctx.sql(getName());
|
||||
|
||||
@ -410,12 +410,7 @@ implements
|
||||
|
||||
|
||||
)) {
|
||||
Schema mappedSchema = Tools.getMappedSchema(ctx, getSchema());
|
||||
|
||||
if (mappedSchema != null && !"".equals(mappedSchema.getName())) {
|
||||
ctx.visit(mappedSchema);
|
||||
ctx.sql('.');
|
||||
}
|
||||
QualifiedImpl.acceptMappedSchemaPrefix(ctx, getSchema());
|
||||
}
|
||||
|
||||
ctx.visit(getMappedTable(ctx, this).getUnqualifiedName());
|
||||
|
||||
@ -159,10 +159,7 @@ implements
|
||||
|
||||
@Override
|
||||
public final void accept(Context<?> ctx) {
|
||||
Schema mappedSchema = getMappedSchema(ctx, getSchema());
|
||||
|
||||
if (mappedSchema != null && !"".equals(mappedSchema.getName()))
|
||||
ctx.visit(mappedSchema).sql('.');
|
||||
QualifiedImpl.acceptMappedSchemaPrefix(ctx, getSchema());
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user