zxcvbnmzsedr commented on issue #20434:
URL:
https://github.com/apache/shardingsphere/issues/20434#issuecomment-1223450553
I find this issues #14
Does PostagesQL not consider the InputStream type?
```
public void setObject(@Positive int parameterIndex, @Nullable Object x)
throws SQLException {
checkClosed();
if (x == null) {
setNull(parameterIndex, Types.OTHER);
} else if (x instanceof UUID &&
connection.haveMinimumServerVersion(ServerVersion.v8_3)) {
setUuid(parameterIndex, (UUID) x);
} else if (x instanceof SQLXML) {
setSQLXML(parameterIndex, (SQLXML) x);
} else if (x instanceof String) {
setString(parameterIndex, (String) x);
} else if (x instanceof BigDecimal) {
setBigDecimal(parameterIndex, (BigDecimal) x);
} else if (x instanceof Short) {
setShort(parameterIndex, (Short) x);
} else if (x instanceof Integer) {
setInt(parameterIndex, (Integer) x);
} else if (x instanceof Long) {
setLong(parameterIndex, (Long) x);
} else if (x instanceof Float) {
setFloat(parameterIndex, (Float) x);
} else if (x instanceof Double) {
setDouble(parameterIndex, (Double) x);
} else if (x instanceof byte[]) {
setBytes(parameterIndex, (byte[]) x);
} else if (x instanceof ByteStreamWriter) {
setByteStreamWriter(parameterIndex, (ByteStreamWriter) x);
} else if (x instanceof java.sql.Date) {
setDate(parameterIndex, (java.sql.Date) x);
} else if (x instanceof Time) {
setTime(parameterIndex, (Time) x);
} else if (x instanceof Timestamp) {
setTimestamp(parameterIndex, (Timestamp) x);
} else if (x instanceof Boolean) {
setBoolean(parameterIndex, (Boolean) x);
} else if (x instanceof Byte) {
setByte(parameterIndex, (Byte) x);
} else if (x instanceof Blob) {
setBlob(parameterIndex, (Blob) x);
} else if (x instanceof Clob) {
setClob(parameterIndex, (Clob) x);
} else if (x instanceof Array) {
setArray(parameterIndex, (Array) x);
} else if (x instanceof PGobject) {
setPGobject(parameterIndex, (PGobject) x);
} else if (x instanceof Character) {
setString(parameterIndex, ((Character) x).toString());
} else if (x instanceof LocalDate) {
setDate(parameterIndex, (LocalDate) x);
} else if (x instanceof LocalTime) {
setTime(parameterIndex, (LocalTime) x);
} else if (x instanceof OffsetTime) {
setTime(parameterIndex, (OffsetTime) x);
} else if (x instanceof LocalDateTime) {
setTimestamp(parameterIndex, (LocalDateTime) x);
} else if (x instanceof OffsetDateTime) {
setTimestamp(parameterIndex, (OffsetDateTime) x);
} else if (x instanceof Map) {
setMap(parameterIndex, (Map<?, ?>) x);
} else if (x instanceof Number) {
setNumber(parameterIndex, (Number) x);
} else if (x.getClass().isArray()) {
try {
setObjectArray(parameterIndex, x);
} catch (Exception e) {
throw new PSQLException(
GT.tr("Cannot cast an instance of {0} to type {1}",
x.getClass().getName(), "Types.ARRAY"),
PSQLState.INVALID_PARAMETER_TYPE, e);
}
} else {
// Can't infer a type.
throw new PSQLException(GT.tr(
"Can''t infer the SQL type to use for an instance of {0}. Use
setObject() with an explicit Types value to specify the type to use.",
x.getClass().getName()), PSQLState.INVALID_PARAMETER_TYPE);
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]