[jOOQ/jOOQ#8986] Consistent naming of "org.jooq.ddl" context data keys
Make sure all key references use a consistent "org.jooq.ddl" prefix.
This commit is contained in:
parent
147345304b
commit
d2cb5570b2
@ -132,10 +132,10 @@ public class DDLDatabase extends H2Database {
|
||||
);
|
||||
|
||||
// [#7771] [#8011] Ignore all parsed storage clauses when executing the statements
|
||||
ctx.data("org.jooq.meta.extensions.ddl.ignore-storage-clauses", true);
|
||||
ctx.data("org.jooq.ddl.ignore-storage-clauses", true);
|
||||
|
||||
// [#8910] Parse things a bit differently for use with the DDLDatabase
|
||||
ctx.data("org.jooq.meta.extensions.ddl.parse-for-ddldatabase", true);
|
||||
ctx.data("org.jooq.ddl.parse-for-ddldatabase", true);
|
||||
|
||||
if (!"AS_IS".equals(defaultNameCase)) {
|
||||
ctx.configuration().set(new DefaultVisitListener() {
|
||||
|
||||
@ -75,7 +75,7 @@ final class CollatedField extends AbstractField<String> {
|
||||
public final void accept(Context<?> ctx) {
|
||||
|
||||
// [#8011] Collations are vendor-specific storage clauses, which we might need to ignore
|
||||
if (ctx.configuration().data("org.jooq.extensions.ddl.ignore-storage-clauses") == null)
|
||||
if (ctx.configuration().data("org.jooq.ddl.ignore-storage-clauses") == null)
|
||||
ctx.sql("((").visit(field).sql(") ").visit(K_COLLATE).sql(' ').visit(collation).sql(')');
|
||||
else
|
||||
ctx.visit(field);
|
||||
|
||||
@ -318,7 +318,7 @@ final class CreateIndexImpl extends AbstractRowCountQuery implements
|
||||
.qualify(true)
|
||||
.sql(')');
|
||||
|
||||
if (where != null && ctx.configuration().data("org.jooq.extensions.ddl.ignore-storage-clauses") == null)
|
||||
if (where != null && ctx.configuration().data("org.jooq.ddl.ignore-storage-clauses") == null)
|
||||
ctx.formatSeparator()
|
||||
.visit(K_WHERE)
|
||||
.sql(' ')
|
||||
|
||||
@ -447,7 +447,7 @@ final class CreateTableImpl extends AbstractRowCountQuery implements
|
||||
.visit(K_COMMENT).sql(' ').visit(comment);
|
||||
|
||||
// [#7772] This data() value should be available from ctx directly, not only from ctx.configuration()
|
||||
if (storage != null && ctx.configuration().data("org.jooq.extensions.ddl.ignore-storage-clauses") == null)
|
||||
if (storage != null && ctx.configuration().data("org.jooq.ddl.ignore-storage-clauses") == null)
|
||||
ctx.formatSeparator()
|
||||
.visit(storage);
|
||||
|
||||
|
||||
@ -91,10 +91,10 @@ final class DDLDatabaseInitializer {
|
||||
ctx = DSL.using(connection, settings);
|
||||
|
||||
// [#7771] [#8011] Ignore all parsed storage clauses when executing the statements
|
||||
ctx.data("org.jooq.extensions.ddl.ignore-storage-clauses", true);
|
||||
ctx.data("org.jooq.ddl.ignore-storage-clauses", true);
|
||||
|
||||
// [#8910] Parse things a bit differently for use with the DDLDatabase
|
||||
ctx.data("org.jooq.extensions.ddl.parse-for-ddldatabase", true);
|
||||
ctx.data("org.jooq.ddl.parse-for-ddldatabase", true);
|
||||
|
||||
final RenderNameCase nameCase = settings.getRenderNameCase();
|
||||
final Locale locale = renderLocale(ctx.settings());
|
||||
|
||||
@ -558,7 +558,7 @@ final class ParserImpl implements Parser {
|
||||
// [#8910] Some statements can be parsed differently when we know we're
|
||||
// parsing them for the DDLDatabase. This method patches these
|
||||
// statements.
|
||||
if (TRUE.equals(ctx.configuration().data("org.jooq.extensions.ddl.parse-for-ddldatabase"))) {
|
||||
if (TRUE.equals(ctx.configuration().data("org.jooq.ddl.parse-for-ddldatabase"))) {
|
||||
if (query instanceof Select) {
|
||||
String sql =
|
||||
ctx.configuration().derive(SettingsTools.clone(ctx.configuration().settings())
|
||||
|
||||
@ -4777,11 +4777,11 @@ final class Tools {
|
||||
}
|
||||
|
||||
// [#8041] Character sets are vendor-specific storage clauses, which we might need to ignore
|
||||
if (type.characterSet() != null && ctx.configuration().data("org.jooq.extensions.ddl.ignore-storage-clauses") == null)
|
||||
if (type.characterSet() != null && ctx.configuration().data("org.jooq.ddl.ignore-storage-clauses") == null)
|
||||
ctx.sql(' ').visit(K_CHARACTER_SET).sql(' ').visit(type.characterSet());
|
||||
|
||||
// [#8011] Collations are vendor-specific storage clauses, which we might need to ignore
|
||||
if (type.collation() != null && ctx.configuration().data("org.jooq.extensions.ddl.ignore-storage-clauses") == null)
|
||||
if (type.collation() != null && ctx.configuration().data("org.jooq.ddl.ignore-storage-clauses") == null)
|
||||
ctx.sql(' ').visit(K_COLLATE).sql(' ').visit(type.collation());
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user