[jOOQ/jOOQ#8077] Support YearToSecond with Oracle

This commit is contained in:
Knut Wannheden 2019-06-21 09:19:21 +02:00
parent 96e2e8288a
commit 7e49b8209f

View File

@ -94,7 +94,6 @@ import java.util.Arrays;
import java.util.EnumSet;
import java.util.regex.Pattern;
import org.jooq.Configuration;
import org.jooq.Context;
import org.jooq.DataType;
import org.jooq.DatePart;
@ -560,6 +559,11 @@ final class Expression<T> extends AbstractField<T> {
@ -573,17 +577,6 @@ final class Expression<T> extends AbstractField<T> {
}
}
/**
* Cast a field to its actual type if it is not a <code>TIMESTAMP</code>
* field
*/
private final Field<T> castNonTimestamps(Configuration configuration, Field<T> result) {
if (getDataType().getType() != Timestamp.class)
return DSL.field("{cast}({0} {as} " + getDataType().getCastTypeName(configuration) + ")", getDataType(), result);
return result;
}
/**
* Return the expression to be rendered when the RHS is a number type
*/