提交 20e6bc3d 编写于 作者: S serge-rider

#3581 Stored procedures call workaround


Former-commit-id: 59e919f3
上级 851638f9
...@@ -105,6 +105,10 @@ public class JDBCConnectionImpl extends AbstractSession implements JDBCSession, ...@@ -105,6 +105,10 @@ public class JDBCConnectionImpl extends AbstractSession implements JDBCSession,
scrollable ? ResultSet.TYPE_SCROLL_INSENSITIVE : ResultSet.TYPE_FORWARD_ONLY, scrollable ? ResultSet.TYPE_SCROLL_INSENSITIVE : ResultSet.TYPE_FORWARD_ONLY,
updatable ? ResultSet.CONCUR_UPDATABLE : ResultSet.CONCUR_READ_ONLY); updatable ? ResultSet.CONCUR_UPDATABLE : ResultSet.CONCUR_READ_ONLY);
} }
catch (SQLSyntaxErrorException e) {
// Call syntax not supported. Let's try t execute it as a regular query
return prepareStatement(DBCStatementType.QUERY, sqlQuery, scrollable, updatable, returnGeneratedKeys);
}
catch (SQLFeatureNotSupportedException | UnsupportedOperationException | IncompatibleClassChangeError e) { catch (SQLFeatureNotSupportedException | UnsupportedOperationException | IncompatibleClassChangeError e) {
return prepareCall(sqlQuery); return prepareCall(sqlQuery);
} }
...@@ -145,7 +149,7 @@ public class JDBCConnectionImpl extends AbstractSession implements JDBCSession, ...@@ -145,7 +149,7 @@ public class JDBCConnectionImpl extends AbstractSession implements JDBCSession,
} }
} }
if (statement instanceof JDBCStatementImpl) { if (statement instanceof JDBCStatementImpl) {
((JDBCStatementImpl)statement).setQueryString(sqlQuery); statement.setQueryString(sqlQuery);
} }
return statement; return statement;
} else if (returnGeneratedKeys) { } else if (returnGeneratedKeys) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册