[jOOQ/jOOQ#9163] Standardise ALTER TYPE

This commit is contained in:
Lukas Eder 2021-01-12 10:38:38 +01:00
parent 853dca158b
commit 95b49c4c9c
109 changed files with 309 additions and 167 deletions

View File

@ -37,9 +37,14 @@
*/
package org.jooq;
import static org.jooq.SQLDialect.*;
import java.util.*;
import org.jetbrains.annotations.*;
/**
* A {@link Query} that can alter types.
* A step in the construction of the <code>ALTER TYPE</code> statement.
* <p>
* <h3>Referencing <code>XYZ*Step</code> types directly from client code</h3>
* <p>
@ -58,9 +63,7 @@ package org.jooq;
* <li>They're less readable</li>
* <li>They might have binary incompatible changes between minor releases</li>
* </ul>
*
* @author Lukas Eder
*/
@SuppressWarnings({ "unused" })
public interface AlterTypeFinalStep extends DDLQuery {
}

View File

@ -37,13 +37,14 @@
*/
package org.jooq;
import static org.jooq.SQLDialect.*;
import java.util.*;
import org.jetbrains.annotations.*;
import static org.jooq.SQLDialect.POSTGRES;
/**
* A {@link Query} that can alter types.
* A step in the construction of the <code>ALTER TYPE</code> statement.
* <p>
* <h3>Referencing <code>XYZ*Step</code> types directly from client code</h3>
* <p>
@ -62,23 +63,21 @@ import static org.jooq.SQLDialect.POSTGRES;
* <li>They're less readable</li>
* <li>They might have binary incompatible changes between minor releases</li>
* </ul>
*
* @author Lukas Eder
*/
@SuppressWarnings({ "unused" })
public interface AlterTypeRenameValueToStep {
/**
* Add the <code>ALTER TYPE .. RENAME VALUE .. TO ..</code> clause.
* Add the <code>TO</code> clause to the <code>ALTER TYPE</code> statement.
*/
@NotNull
@Support({ POSTGRES })
AlterTypeFinalStep to(String newEnumValue);
@NotNull
AlterTypeFinalStep to(String renameValueTo);
/**
* Add the <code>ALTER TYPE .. RENAME VALUE .. TO ..</code> clause.
* Add the <code>TO</code> clause to the <code>ALTER TYPE</code> statement.
*/
@NotNull
@Support({ POSTGRES })
AlterTypeFinalStep to(Field<String> newEnumValue);
@NotNull
AlterTypeFinalStep to(Field<String> renameValueTo);
}

View File

@ -37,14 +37,14 @@
*/
package org.jooq;
import static org.jooq.SQLDialect.*;
import java.util.*;
import org.jetbrains.annotations.*;
import static org.jooq.SQLDialect.POSTGRES;
// ...
/**
* A {@link Query} that can alter types.
* A step in the construction of the <code>ALTER TYPE</code> statement.
* <p>
* <h3>Referencing <code>XYZ*Step</code> types directly from client code</h3>
* <p>
@ -63,73 +63,70 @@ import static org.jooq.SQLDialect.POSTGRES;
* <li>They're less readable</li>
* <li>They might have binary incompatible changes between minor releases</li>
* </ul>
*
* @author Lukas Eder
*/
@SuppressWarnings({ "unused" })
public interface AlterTypeStep {
/**
* Add the <code>ALTER TYPE .. RENAME TO ..</code> clause.
* Add the <code>RENAME TO</code> clause to the <code>ALTER TYPE</code> statement.
*/
@NotNull
@Support({ POSTGRES })
AlterTypeFinalStep renameTo(String newName);
@NotNull
AlterTypeFinalStep renameTo(String renameTo);
/**
* Add the <code>ALTER TYPE .. RENAME TO ..</code> clause.
* Add the <code>RENAME TO</code> clause to the <code>ALTER TYPE</code> statement.
*/
@NotNull
@Support({ POSTGRES })
AlterTypeFinalStep renameTo(Name newName);
@NotNull
AlterTypeFinalStep renameTo(Name renameTo);
/**
* Add the <code>ALTER TYPE .. SET SCHEMA ..</code> clause.
* Add the <code>SET SCHEMA</code> clause to the <code>ALTER TYPE</code> statement.
*/
@NotNull
@Support({ POSTGRES })
AlterTypeFinalStep setSchema(String newSchema);
@NotNull
AlterTypeFinalStep setSchema(String setSchema);
/**
* Add the <code>ALTER TYPE .. SET SCHEMA ..</code> clause.
* Add the <code>SET SCHEMA</code> clause to the <code>ALTER TYPE</code> statement.
*/
@NotNull
@Support({ POSTGRES })
AlterTypeFinalStep setSchema(Name newSchema);
@NotNull
AlterTypeFinalStep setSchema(Name setSchema);
/**
* Add the <code>ALTER TYPE .. SET SCHEMA ..</code> clause.
* Add the <code>SET SCHEMA</code> clause to the <code>ALTER TYPE</code> statement.
*/
@NotNull
@Support({ POSTGRES })
AlterTypeFinalStep setSchema(Schema newSchema);
@NotNull
AlterTypeFinalStep setSchema(Schema setSchema);
/**
* Add the <code>ALTER TYPE .. ADD VALUE ..</code> clause.
* Add the <code>ADD VALUE</code> clause to the <code>ALTER TYPE</code> statement.
*/
@NotNull
@Support({ POSTGRES })
AlterTypeFinalStep addValue(String newEnumValue);
@NotNull
AlterTypeFinalStep addValue(String addValue);
/**
* Add the <code>ALTER TYPE .. ADD VALUE ..</code> clause.
* Add the <code>ADD VALUE</code> clause to the <code>ALTER TYPE</code> statement.
*/
@NotNull
@Support({ POSTGRES })
AlterTypeFinalStep addValue(Field<String> newEnumValue);
@NotNull
AlterTypeFinalStep addValue(Field<String> addValue);
/**
* Add the <code>ALTER TYPE .. RENAME VALUE ..</code> clause.
* Add the <code>RENAME VALUE</code> clause to the <code>ALTER TYPE</code> statement.
*/
@NotNull
@Support({ POSTGRES })
AlterTypeRenameValueToStep renameValue(String existingEnumValue);
@NotNull
AlterTypeRenameValueToStep renameValue(String renameValue);
/**
* Add the <code>ALTER TYPE .. RENAME VALUE ..</code> clause.
* Add the <code>RENAME VALUE</code> clause to the <code>ALTER TYPE</code> statement.
*/
@NotNull
@Support({ POSTGRES })
AlterTypeRenameValueToStep renameValue(Field<String> existingEnumValue);
@NotNull
AlterTypeRenameValueToStep renameValue(Field<String> renameValue);
}

View File

@ -9688,6 +9688,24 @@ public interface DSLContext extends Scope {
@Support({ H2 })
AlterSchemaStep alterSchemaIfExists(Schema schema);
/**
* The <code>ALTER TYPE</code> statement.
*
* @see DSL#alterType(String)
*/
@NotNull
@Support({ POSTGRES })
AlterTypeStep alterType(String type);
/**
* The <code>ALTER TYPE</code> statement.
*
* @see DSL#alterType(Name)
*/
@NotNull
@Support({ POSTGRES })
AlterTypeStep alterType(Name type);
/**
* The <code>ALTER VIEW</code> statement.
*
@ -10991,24 +11009,6 @@ public interface DSLContext extends Scope {
@Support({ H2, POSTGRES })
CreateTypeStep createType(Name type);
/**
* Create a new DSL <code>ALTER TYPE</code> statement.
*
* @see DSL#alterType(String)
*/
@NotNull
@Support({ POSTGRES })
AlterTypeStep alterType(String type);
/**
* Create a new DSL <code>ALTER TYPE</code> statement.
*
* @see DSL#alterType(Name)
*/
@NotNull
@Support({ POSTGRES })
AlterTypeStep alterType(Name type);
/**
* Create a new DSL <code>DROP TYPE</code> statement.
*

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -37,119 +37,155 @@
*/
package org.jooq.impl;
import static org.jooq.impl.DSL.name;
import static org.jooq.impl.DSL.schema;
import static org.jooq.impl.Keywords.K_ADD;
import static org.jooq.impl.Keywords.K_ALTER;
import static org.jooq.impl.Keywords.K_RENAME;
import static org.jooq.impl.Keywords.K_RENAME_TO;
import static org.jooq.impl.Keywords.K_SCHEMA;
import static org.jooq.impl.Keywords.K_SET;
import static org.jooq.impl.Keywords.K_TO;
import static org.jooq.impl.Keywords.K_TYPE;
import static org.jooq.impl.Keywords.K_VALUE;
import static org.jooq.impl.DSL.*;
import static org.jooq.impl.Internal.*;
import static org.jooq.impl.Keywords.*;
import static org.jooq.impl.Names.*;
import static org.jooq.impl.SQLDataType.*;
import static org.jooq.impl.Tools.*;
import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;
import java.util.*;
import org.jooq.AlterTypeFinalStep;
import org.jooq.AlterTypeRenameValueToStep;
import org.jooq.AlterTypeStep;
import org.jooq.Configuration;
import org.jooq.Context;
import org.jooq.Field;
import org.jooq.Name;
import org.jooq.Schema;
import org.jooq.conf.ParamType;
/**
* @author Lukas Eder
* The <code>ALTER TYPE</code> statement.
*/
final class AlterTypeImpl extends AbstractRowCountQuery implements
// Cascading interface implementations for CREATE TYPE behaviour
@SuppressWarnings({ "hiding", "rawtypes", "unchecked", "unused" })
final class AlterTypeImpl
extends
AbstractRowCountQuery
implements
AlterTypeStep,
AlterTypeRenameValueToStep,
AlterTypeFinalStep {
AlterTypeFinalStep
{
private static final long serialVersionUID = -5018375056147329888L;
private final Name type;
private Name renameTo;
private Schema setSchema;
private Field<String> addValue;
private Field<String> renameValueFrom;
private Field<String> renameValueTo;
private static final long serialVersionUID = 1L;
AlterTypeImpl(Configuration configuration, Name type) {
private final Name type;
private Name renameTo;
private Schema setSchema;
private Field<String> addValue;
private Field<String> renameValue;
private Field<String> renameValueTo;
AlterTypeImpl(
Configuration configuration,
Name type
) {
this(
configuration,
type,
null,
null,
null,
null,
null
);
}
AlterTypeImpl(
Configuration configuration,
Name type,
Name renameTo,
Schema setSchema,
Field<String> addValue,
Field<String> renameValue,
Field<String> renameValueTo
) {
super(configuration);
this.type = type;
this.renameTo = renameTo;
this.setSchema = setSchema;
this.addValue = addValue;
this.renameValue = renameValue;
this.renameValueTo = renameValueTo;
}
// ------------------------------------------------------------------------
final Name $type() { return type; }
final Name $renameTo() { return renameTo; }
final Schema $setSchema() { return setSchema; }
final Field<String> $addValue() { return addValue; }
final Field<String> $renameValue() { return renameValue; }
final Field<String> $renameValueTo() { return renameValueTo; }
// -------------------------------------------------------------------------
// XXX: DSL API
// ------------------------------------------------------------------------
// -------------------------------------------------------------------------
@Override
public final AlterTypeImpl renameTo(String newName) {
return renameTo(DSL.name(newName));
public final AlterTypeImpl renameTo(String renameTo) {
return renameTo(DSL.name(renameTo));
}
@Override
public final AlterTypeImpl renameTo(Name newName) {
this.renameTo = newName;
public final AlterTypeImpl renameTo(Name renameTo) {
this.renameTo = renameTo;
return this;
}
@Override
public final AlterTypeImpl setSchema(String newSchema) {
return setSchema(name(newSchema));
public final AlterTypeImpl setSchema(String setSchema) {
return setSchema(DSL.schema(DSL.name(setSchema)));
}
@Override
public final AlterTypeImpl setSchema(Name newSchema) {
return setSchema(schema(newSchema));
public final AlterTypeImpl setSchema(Name setSchema) {
return setSchema(DSL.schema(setSchema));
}
@Override
public final AlterTypeImpl setSchema(Schema newSchema) {
this.setSchema = newSchema;
public final AlterTypeImpl setSchema(Schema setSchema) {
this.setSchema = setSchema;
return this;
}
@Override
public final AlterTypeImpl addValue(String newEnumValue) {
return addValue(Tools.field(newEnumValue));
public final AlterTypeImpl addValue(String addValue) {
return addValue(Tools.field(addValue));
}
@Override
public final AlterTypeImpl addValue(Field<String> newEnumValue) {
this.addValue = newEnumValue;
public final AlterTypeImpl addValue(Field<String> addValue) {
this.addValue = addValue;
return this;
}
@Override
public final AlterTypeImpl renameValue(String existingEnumValue) {
return renameValue(Tools.field(existingEnumValue));
public final AlterTypeImpl renameValue(String renameValue) {
return renameValue(Tools.field(renameValue));
}
@Override
public final AlterTypeImpl renameValue(Field<String> existingEnumValue) {
this.renameValueFrom = existingEnumValue;
public final AlterTypeImpl renameValue(Field<String> renameValue) {
this.renameValue = renameValue;
return this;
}
@Override
public final AlterTypeImpl to(String newEnumValue) {
return to(Tools.field(newEnumValue));
public final AlterTypeImpl to(String renameValueTo) {
return to(Tools.field(renameValueTo));
}
@Override
public final AlterTypeImpl to(Field<String> newEnumValue) {
this.renameValueTo = newEnumValue;
public final AlterTypeImpl to(Field<String> renameValueTo) {
this.renameValueTo = renameValueTo;
return this;
}
// ------------------------------------------------------------------------
// -------------------------------------------------------------------------
// XXX: QueryPart API
// ------------------------------------------------------------------------
// -------------------------------------------------------------------------
@Override
public final void accept(Context<?> ctx) {
@ -165,9 +201,11 @@ final class AlterTypeImpl extends AbstractRowCountQuery implements
ctx.visit(K_SET).sql(' ').visit(K_SCHEMA).sql(' ').visit(setSchema);
else if (addValue != null)
ctx.visit(K_ADD).sql(' ').visit(K_VALUE).sql(' ').visit(addValue);
else if (renameValueFrom != null)
ctx.visit(K_RENAME).sql(' ').visit(K_VALUE).sql(' ').visit(renameValueFrom).sql(' ').visit(K_TO).sql(' ').visit(renameValueTo);
else if (renameValue != null)
ctx.visit(K_RENAME).sql(' ').visit(K_VALUE).sql(' ').visit(renameValue).sql(' ').visit(K_TO).sql(' ').visit(renameValueTo);
ctx.paramType(previous);
}
}

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -100,5 +100,6 @@ package org.jooq.impl;

View File

@ -100,5 +100,6 @@ package org.jooq.impl;

View File

@ -108,5 +108,6 @@ package org.jooq.impl;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -7678,6 +7678,28 @@ public class DSL {
return dsl().alterSchemaIfExists(schema);
}
/**
* The <code>ALTER TYPE</code> statement.
*
* @see DSLContext#alterType(String)
*/
@NotNull
@Support({ POSTGRES })
public static org.jooq.AlterTypeStep alterType(String type) {
return dsl().alterType(type);
}
/**
* The <code>ALTER TYPE</code> statement.
*
* @see DSLContext#alterType(Name)
*/
@NotNull
@Support({ POSTGRES })
public static org.jooq.AlterTypeStep alterType(Name type) {
return dsl().alterType(type);
}
/**
* The <code>ALTER VIEW</code> statement.
*
@ -9038,28 +9060,6 @@ public class DSL {
return dsl().createType(type);
}
/**
* Create a new DSL <code>ALTER TYPE</code> statement.
*
* @see DSLContext#alterType(String)
*/
@NotNull
@Support({ POSTGRES })
public static AlterTypeStep alterType(String type) {
return dsl().alterType(type);
}
/**
* Create a new DSL <code>ALTER TYPE</code> statement.
*
* @see DSLContext#alterType(Name)
*/
@NotNull
@Support({ POSTGRES })
public static AlterTypeStep alterType(Name type) {
return dsl().alterType(type);
}
/**
* Create a new DSL <code>DROP TYPE</code> statement.
*

View File

@ -3001,6 +3001,16 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
return new AlterSchemaImpl(configuration(), schema, true);
}
@Override
public org.jooq.AlterTypeStep alterType(String type) {
return new AlterTypeImpl(configuration(), DSL.name(type));
}
@Override
public org.jooq.AlterTypeStep alterType(Name type) {
return new AlterTypeImpl(configuration(), type);
}
@Override
public org.jooq.AlterViewStep alterView(String view) {
return new AlterViewImpl(configuration(), DSL.table(DSL.name(view)), false);
@ -3697,16 +3707,6 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
return new CreateTypeImpl(configuration(), type);
}
@Override
public AlterTypeStep alterType(String type) {
return alterType(name(type));
}
@Override
public AlterTypeStep alterType(Name type) {
return new AlterTypeImpl(configuration(), type);
}
@Override
public DropTypeStep dropType(String type) {
return dropType(name(type));

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;
@ -177,8 +178,11 @@ implements
ctx.visit(index);
if (on != null && REQUIRES_ON.contains(ctx.dialect()))
ctx.sql(' ').visit(K_ON).sql(' ').visit(on);
if (REQUIRES_ON.contains(ctx.dialect()))
if (on != null)
ctx.sql(' ').visit(K_ON).sql(' ').visit(on);
else if (index.getTable() != null)
ctx.sql(' ').visit(K_ON).sql(' ').visit(index.getTable());
if (cascade != null)
ctx.sql(' ').visit(cascade ? K_CASCADE : K_RESTRICT);

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -100,5 +100,6 @@ package org.jooq.impl;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -137,5 +137,6 @@ package org.jooq.impl;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -111,5 +111,6 @@ package org.jooq.impl;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -112,5 +112,6 @@ package org.jooq.impl;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

View File

@ -47,6 +47,7 @@ import static org.jooq.impl.Tools.BooleanDataKey.*;
import static org.jooq.SQLDialect.*;
import org.jooq.*;
import org.jooq.conf.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

Some files were not shown because too many files have changed in this diff Show More