Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
import java.math.BigInteger;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.time.*;
import java.time.Duration;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.OffsetDateTime;
import java.time.ZonedDateTime;
import java.time.temporal.TemporalAmount;
import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public boolean readToPOJO(Map<String, POJOFieldDeserializer> deserializers, Obje
* It is still internal method and should be used with care.
* Usually this method is called to read next record into internal object and affects hasNext() method.
* So after calling this one:
* - hasNext(), next() should not be called
* - hasNext(), next() and get methods cannot be called
* - stream should be read with readRecord() method fully
*
* @param record
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import com.clickhouse.client.api.ClientException;
import com.clickhouse.client.api.DataTypeUtils;
import com.clickhouse.client.api.ServerException;
import com.clickhouse.client.api.command.CommandResponse;
import com.clickhouse.client.api.command.CommandSettings;
import com.clickhouse.client.api.data_formats.ClickHouseBinaryFormatReader;
import com.clickhouse.client.api.data_formats.internal.BinaryStreamReader;
Expand Down Expand Up @@ -43,7 +42,6 @@
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.testng.util.Strings;

import java.io.BufferedReader;
import java.io.BufferedWriter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ public void setDefaultQuerySettings(QuerySettings settings) {
this.defaultQuerySettings = settings;
}

public Calendar getDefaultCalendar() {
return defaultCalendar;
}

public String getServerVersion() throws SQLException {
GenericRecord result = client.queryAll("SELECT version() as server_version").stream()
.findFirst().orElseThrow(() -> new SQLException("Failed to retrieve server version.", ExceptionUtils.SQL_STATE_CLIENT_ERROR));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

public class ResultSetImpl implements ResultSet, JdbcV2Wrapper {
private static final Logger log = LoggerFactory.getLogger(ResultSetImpl.class);
private ResultSetMetaData metaData;
private ResultSetMetaDataImpl metaData;
protected ClickHouseBinaryFormatReader reader;
private QueryResponse response;
private boolean closed;
Expand All @@ -49,9 +49,9 @@ public class ResultSetImpl implements ResultSet, JdbcV2Wrapper {

private final FeatureManager featureManager;

private static final int AFTER_LAST = -1;
private static final int BEFORE_FIRST = 0;
private static final int FIRST_ROW = 1;
public static final int AFTER_LAST = -1;
public static final int BEFORE_FIRST = 0;
public static final int FIRST_ROW = 1;
private int rowPos;

private int fetchSize;
Expand Down
Loading
Loading