[jOOQ/jOOQ#16875] Support BigQuery TIMESTAMP data type as SQLDataType.TIMESTAMPWITHTIMEZONE
This commit is contained in:
parent
391ee60937
commit
d259aa6308
@ -3461,6 +3461,13 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
|
||||
|
||||
static final class DefaultOffsetDateTimeBinding<U> extends InternalBinding<OffsetDateTime, U> {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DefaultOffsetDateTimeBinding(DataType<OffsetDateTime> dataType, Converter<OffsetDateTime, U> converter) {
|
||||
super(dataType, converter);
|
||||
}
|
||||
@ -3544,6 +3551,12 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
|
||||
final OffsetDateTime get0(BindingGetResultSetContext<U> ctx) throws SQLException {
|
||||
if (!FALSE.equals(ctx.settings().isBindOffsetDateTimeType()))
|
||||
return ctx.resultSet().getObject(ctx.index(), OffsetDateTime.class);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
else
|
||||
return OffsetDateTimeParser.offsetDateTime(ctx.resultSet().getString(ctx.index()));
|
||||
}
|
||||
@ -3552,6 +3565,12 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
|
||||
final OffsetDateTime get0(BindingGetStatementContext<U> ctx) throws SQLException {
|
||||
if (!FALSE.equals(ctx.settings().isBindOffsetDateTimeType()))
|
||||
return ctx.statement().getObject(ctx.index(), OffsetDateTime.class);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
else
|
||||
return OffsetDateTimeParser.offsetDateTime(ctx.statement().getString(ctx.index()));
|
||||
}
|
||||
@ -3573,6 +3592,9 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
else
|
||||
throw new UnsupportedOperationException("Type " + dataType + " is not supported");
|
||||
}
|
||||
@ -3591,6 +3613,9 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// [#5779] Revert to encoding this type as string.
|
||||
else
|
||||
return Types.VARCHAR;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user