ignite-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ignite] pavlukhin commented on a change in pull request #6490: IGNITE-7285 Add default query timeout
Date Mon, 30 Sep 2019 09:08:32 GMT
pavlukhin commented on a change in pull request #6490: IGNITE-7285 Add default query timeout
URL: https://github.com/apache/ignite/pull/6490#discussion_r329477190
 
 

 ##########
 File path: modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryParser.java
 ##########
 @@ -134,6 +136,51 @@ public QueryParserResult parse(String schemaName, SqlFieldsQuery qry,
boolean re
         return res;
     }
 
+    /**
+     * Create parameters from query.
+     *
+     * @param qry Query.
+     * @return Parameters.
+     */
+    public QueryParameters queryParameters(SqlFieldsQuery qry) {
+        NestedTxMode nestedTxMode = NestedTxMode.DEFAULT;
+        boolean autoCommit = true;
+        List<Object[]> batchedArgs = null;
+
+        if (qry instanceof SqlFieldsQueryEx) {
+            SqlFieldsQueryEx qry0 = (SqlFieldsQueryEx)qry;
+
+            if (qry0.getNestedTxMode() != null)
+                nestedTxMode = qry0.getNestedTxMode();
+
+            autoCommit = qry0.isAutoCommit();
+
+            batchedArgs = qry0.batchedArguments();
+        }
+
+        int timeout;
+
+        if (qry.getTimeout() >= 0) {
 
 Review comment:
   Curly braces are redundant according to code style.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message