pavlukhin commented on a change in pull request #6490: IGNITE-7285 Add default
query timeout
URL: https://github.com/apache/ignite/pull/6490#discussion_r322197696
##########
File path:
modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryParser.java
##########
@@ -134,6 +135,49 @@ public QueryParserResult parse(String schemaName,
SqlFieldsQuery qry, boolean re
return res;
}
+ /**
+ * Create parameters from query.
+ *
+ * @param qry Query.
+ * @return Parameters.
+ */
+ public QueryParameters fromQuery(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 = 0;
Review comment:
Initialization to 0 is not necessary here.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services