protected ClickHouseRecord issue(String command, boolean sessionCheck, Map<String, Serializable> settings)
            throws ClickHouseException {
        ClickHouseRecord result = ClickHouseRecord.EMPTY;
        try (ClickHouseResponse response = ClickHouseClient.newInstance(server.getProtocol()).read(server)
                .format(ClickHouseFormat.RowBinaryWithNamesAndTypes)
                .settings(settings).session(sessionId, sessionCheck, timeout > 0 ? timeout : null)
                .query(command).executeAndWait()) {
            Iterator<ClickHouseRecord> records = response.records().iterator();
            if (records.hasNext()) {
                result = records.next();
            }
        } catch (ClickHouseException e) {
            switch (e.getErrorCode()) {
                case ClickHouseException.ERROR_SESSION_NOT_FOUND:
                    throw new ClickHouseTransactionException(
                            "Invalid transaction due to session not found or timed out", e.getCause(), this);
                case ClickHouseTransactionException.ERROR_INVALID_TRANSACTION:
                case ClickHouseTransactionException.ERROR_UNKNOWN_STATUS_OF_TRANSACTION:
                    throw new ClickHouseTransactionException(e.getErrorCode(), e.getMessage(), e.getCause(), this);
                default:
                    break;
            }
            throw e;
        }
        return result;
    }
Issues transaction related query.

@param command      non-empty transaction related query
@param sessionCheck whether to enable session check
@param settings     optional server settings
@return non-null record
@throws ClickHouseException when failed to issue the query
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseTransaction.java