You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Pavel Vinokurov (Jira)" <ji...@apache.org> on 2020/05/12 09:11:00 UTC

[jira] [Created] (IGNITE-13000) Connection.prepareStatement(String,int) always throws UnsupportedException ignoring 'autoGeneratedKeys' parameter

Pavel Vinokurov created IGNITE-13000:
----------------------------------------

             Summary: Connection.prepareStatement(String,int) always throws UnsupportedException  ignoring  'autoGeneratedKeys' parameter
                 Key: IGNITE-13000
                 URL: https://issues.apache.org/jira/browse/IGNITE-13000
             Project: Ignite
          Issue Type: Bug
          Components: sql
    Affects Versions: 2.8
            Reporter: Pavel Vinokurov


Below the method call throwing Exception.
{code:java}
conn.prepareStatement(query, Statement.NO_GENERATED_KEYS)
{code}

But there is should be the same result as for:
{code:java}
conn.prepareStatement(query)
{code}


The possible fix:
{code:java}
@Override 
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException {
    ensureNotClosed();
    if(autoGeneratedKeys == Statement.RETURN_GENERATED_KEYS)
        throw new SQLFeatureNotSupportedException("Auto generated keys are not supported.");
    return prepareStatement(sql);
}
{code}




--
This message was sent by Atlassian Jira
(v8.3.4#803005)