[#629] Add support for the Teradata database

This commit is contained in:
lukaseder 2018-05-31 18:20:41 +02:00
parent 89e5dde657
commit 2aeef588f2
4 changed files with 11 additions and 6 deletions

View File

@ -976,6 +976,8 @@ final class AlterTableImpl extends AbstractQuery implements
case H2:
case MARIADB:
case POSTGRES:
@ -1078,6 +1080,9 @@ final class AlterTableImpl extends AbstractQuery implements
ctx.sql(' ').visit(K_SET_DATA_TYPE);
break;
case FIREBIRD:
case POSTGRES:
ctx.sql(' ').visit(K_TYPE);

View File

@ -50,6 +50,7 @@ import static org.jooq.SQLDialect.MYSQL;
// ...
// ...
// ...
// ...
import static org.jooq.impl.DSL.name;
import static org.jooq.impl.DSL.table;
import static org.jooq.impl.Keywords.K_DROP_INDEX;

View File

@ -2641,7 +2641,7 @@ final class ParserImpl implements Parser {
return Internal.createIndex(name == null ? DSL.name("") : name, table, fields, false);
}
private static boolean parseConstraintStateIf(ParserContext ctx) {
private static final boolean parseConstraintStateIf(ParserContext ctx) {
parseKeywordIf(ctx, "ENABLE");
return true;
}
@ -7183,7 +7183,6 @@ final class ParserImpl implements Parser {
if (parseKeywordOrIdentifierIf(ctx, "WITHOUT TIME ZONE") || true)
return precision == null ? SQLDataType.TIME : SQLDataType.TIME(precision);
}
else if (parseKeywordOrIdentifierIf(ctx, "TINYBLOB"))
return SQLDataType.BLOB;
else if (parseKeywordOrIdentifierIf(ctx, "TINYINT"))

View File

@ -56,6 +56,7 @@ import static org.jooq.SQLDialect.POSTGRES;
import static org.jooq.SQLDialect.POSTGRES_10;
// ...
// ...
// ...
import static org.jooq.conf.SettingsTools.getExecuteUpdateWithoutWhere;
import static org.jooq.impl.DSL.select;
import static org.jooq.impl.Keywords.K_FROM;
@ -459,9 +460,8 @@ final class UpdateQueryImpl<R extends Record> extends AbstractStoreQuery<R> impl
@Override
public final void addFrom(Collection<? extends TableLike<?>> f) {
for (TableLike<?> provider : f) {
for (TableLike<?> provider : f)
from.add(provider.asTable());
}
}
@Override
@ -635,16 +635,16 @@ final class UpdateQueryImpl<R extends Record> extends AbstractStoreQuery<R> impl
default:
ctx.start(UPDATE_FROM);
if (!from.isEmpty()) {
if (!from.isEmpty())
ctx.formatSeparator()
.visit(K_FROM).sql(' ')
.declareTables(true)
.visit(from)
.declareTables(false);
}
ctx.end(UPDATE_FROM);
break;