AMashenkov commented on a change in pull request #284: URL: https://github.com/apache/ignite-3/pull/284#discussion_r704266054
########## File path: modules/client/src/main/java/org/apache/ignite/internal/jdbc/JdbcStatement.java ########## @@ -0,0 +1,640 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.jdbc; + +import java.sql.BatchUpdateException; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.SQLFeatureNotSupportedException; +import java.sql.SQLWarning; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import org.apache.ignite.client.proto.query.IgniteQueryErrorCode; +import org.apache.ignite.client.proto.query.SqlStateCode; +import org.apache.ignite.client.proto.query.event.JdbcBatchExecuteRequest; +import org.apache.ignite.client.proto.query.event.JdbcBatchExecuteResult; +import org.apache.ignite.client.proto.query.event.JdbcQuery; +import org.apache.ignite.client.proto.query.event.JdbcQueryExecuteRequest; +import org.apache.ignite.client.proto.query.event.JdbcQueryExecuteResult; +import org.apache.ignite.client.proto.query.event.JdbcQuerySingleResult; +import org.apache.ignite.internal.util.ArrayUtils; +import org.apache.ignite.internal.util.CollectionUtils; + +import static java.sql.ResultSet.CONCUR_READ_ONLY; +import static java.sql.ResultSet.FETCH_FORWARD; +import static java.sql.ResultSet.TYPE_FORWARD_ONLY; + +/** + * Jdbc statement implementation. + */ +public class JdbcStatement implements Statement { + /** Default queryPage size. */ + private static final int DFLT_PAGE_SIZE = 1024; + + /** JDBC Connection implementation. */ + private final JdbcConnection conn; + + /** Result set holdability. */ + private final int resHoldability; + + /** Schema name. */ + private final String schema; + + /** Closed flag. */ + private volatile boolean closed; + + /** Query timeout. */ + private int timeout; + + /** Rows limit. */ + private int maxRows; + + /** Fetch size. */ + private int pageSize = DFLT_PAGE_SIZE; Review comment: Do we have plans to get deafult value from Connection? Let's create a ticket for this. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
