[jOOQ/jOOQ#17506] ORA-00904: invalid identifier when trying to insert into tables with lower case identifier in Oracle
This commit is contained in:
parent
4986dd0344
commit
e3c9874c4c
@ -792,6 +792,25 @@ abstract class AbstractDMLQuery<R extends Record> extends AbstractRowCountQuery
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -51,6 +51,7 @@ import java.util.Arrays;
|
||||
|
||||
import org.jooq.Context;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.Scope;
|
||||
import org.jooq.conf.RenderQuotedNames;
|
||||
import org.jooq.conf.SettingsTools;
|
||||
import org.jooq.tools.StringUtils;
|
||||
@ -92,20 +93,23 @@ final class UnqualifiedName extends AbstractName {
|
||||
|
||||
|
||||
|
||||
RenderQuotedNames q = SettingsTools.getRenderQuotedNames(ctx.settings());
|
||||
|
||||
boolean previous = ctx.quote();
|
||||
boolean current = quoted != SYSTEM && (
|
||||
q == RenderQuotedNames.ALWAYS
|
||||
|| q == RenderQuotedNames.EXPLICIT_DEFAULT_QUOTED && (quoted == DEFAULT || quoted == QUOTED)
|
||||
|| q == RenderQuotedNames.EXPLICIT_DEFAULT_UNQUOTED && quoted == QUOTED
|
||||
);
|
||||
|
||||
ctx.quote(current);
|
||||
ctx.quote(quoted(ctx));
|
||||
ctx.literal(defaultIfNull(name, ""));
|
||||
ctx.quote(previous);
|
||||
}
|
||||
|
||||
final boolean quoted(Scope ctx) {
|
||||
RenderQuotedNames q = SettingsTools.getRenderQuotedNames(ctx.settings());
|
||||
|
||||
return quoted != SYSTEM && (
|
||||
q == RenderQuotedNames.ALWAYS
|
||||
|| q == RenderQuotedNames.EXPLICIT_DEFAULT_QUOTED && (quoted == DEFAULT || quoted == QUOTED)
|
||||
|| q == RenderQuotedNames.EXPLICIT_DEFAULT_UNQUOTED && quoted == QUOTED
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String first() {
|
||||
return name;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user