[ 
https://issues.apache.org/jira/browse/IGNITE-16268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konstantin Orlov updated IGNITE-16268:
--------------------------------------
    Labels: ignite-3  (was: )

> JDBC. Validation of statement type should be done before its execution
> ----------------------------------------------------------------------
>
>                 Key: IGNITE-16268
>                 URL: https://issues.apache.org/jira/browse/IGNITE-16268
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Konstantin Orlov
>            Priority: Major
>              Labels: ignite-3
>
> Currently, it's possible to execute DML statement such as INSERT, UPDATE, or 
> DELETE with {{Statement#executeQuery}} method. The statement will be 
> executed, and exception will be thrown after result of the execution will be 
> received.
> {code:java}
> class JdbcStatement {
>     public ResultSet executeQuery(String sql) throws SQLException {
>         ...
>         ResultSet rs = getResultSet();
>         if (rs == null) {
>             throw new SQLException("The query isn't SELECT query: " + sql, 
> SqlStateCode.PARSING_EXCEPTION);
>         }
>         ...
>     }
>     public ResultSet getResultSet() throws SQLException {
>         ...
>         JdbcResultSet rs = resSets.get(curRes);
>         if (!rs.isQuery()) {
>             return null;
>         }
>         ...
>     }
> {code}
> Let's validate the type of the statement before its execution. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to