diff --git a/jOOQ/src/main/java/org/jooq/CommentOnIsStep.java b/jOOQ/src/main/java/org/jooq/CommentOnIsStep.java index 1562249c24..eb6385731d 100644 --- a/jOOQ/src/main/java/org/jooq/CommentOnIsStep.java +++ b/jOOQ/src/main/java/org/jooq/CommentOnIsStep.java @@ -45,6 +45,7 @@ import static org.jooq.SQLDialect.MARIADB; import static org.jooq.SQLDialect.MYSQL; // ... import static org.jooq.SQLDialect.POSTGRES; +// ... /** * The step in the COMMENT ON [ object type ] statement where the diff --git a/jOOQ/src/main/java/org/jooq/impl/CommentOnImpl.java b/jOOQ/src/main/java/org/jooq/impl/CommentOnImpl.java index b8986b81e5..89551858f4 100644 --- a/jOOQ/src/main/java/org/jooq/impl/CommentOnImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/CommentOnImpl.java @@ -38,9 +38,17 @@ package org.jooq.impl; import static org.jooq.impl.DSL.comment; +import static org.jooq.impl.DSL.inline; import static org.jooq.impl.Keywords.K_ALTER_TABLE; +import static org.jooq.impl.Keywords.K_BEGIN_CATCH; +import static org.jooq.impl.Keywords.K_BEGIN_TRY; import static org.jooq.impl.Keywords.K_COLUMN; import static org.jooq.impl.Keywords.K_COMMENT; +import static org.jooq.impl.Keywords.K_DECLARE; +import static org.jooq.impl.Keywords.K_DEFAULT; +import static org.jooq.impl.Keywords.K_END_CATCH; +import static org.jooq.impl.Keywords.K_END_TRY; +import static org.jooq.impl.Keywords.K_EXEC; import static org.jooq.impl.Keywords.K_IS; import static org.jooq.impl.Keywords.K_ON; import static org.jooq.impl.Keywords.K_TABLE; @@ -52,6 +60,7 @@ import org.jooq.CommentOnIsStep; import org.jooq.Configuration; import org.jooq.Context; import org.jooq.Field; +import org.jooq.Name; import org.jooq.Table; /** @@ -88,6 +97,12 @@ implements @Override public final void accept(Context ctx) { switch (ctx.family()) { + + + + + + case MARIADB: case MYSQL: { if (table != null) @@ -105,6 +120,45 @@ implements } } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + private final void acceptMySQL(Context ctx) { ctx.visit(K_ALTER_TABLE).sql(' ').visit(table).sql(' ').visit(K_COMMENT).sql(" = ").visit(comment); }