@Override public SQLWarning getWarnings() throws SQLException { return targetConnection.getWarnings(); }
@Override public SQLWarning getWarnings() throws SQLException { return raw.getWarnings(); }
@Override public SQLWarning getWarnings() throws SQLException { return raw.getWarnings(); }
@Override public SQLWarning getWarnings() throws SQLException { return connection.getWarnings(); }
@Override public SQLWarning getWarnings() throws SQLException { return delegate.getWarnings(); }
@Override public SQLWarning getWarnings() throws SQLException { return delegate.getWarnings(); }
@Override public SQLWarning getWarnings() throws SQLException { return connection.getWarnings(); }
@Override public SQLWarning getWarnings() throws SQLException { return connection.getWarnings(); }
@Override public SQLWarning getWarnings() throws SQLException { return delegate.getWarnings(); }
@Override public SQLWarning getWarnings() throws SQLException { checkState(); return conn.getWarnings(); }
/** {@inheritDoc} */ @Override public SQLWarning getWarnings() throws SQLException { return conn.getWarnings(); }
@Override public SQLWarning getWarnings() throws SQLException { return _baseConn.getWarnings(); }
@Override public void run() throws Exception { conn.getWarnings(); } });
@Override public SQLWarning getWarnings() throws SQLException { blockUntilAvailable(); return connection.getWarnings(); }
@Override public SQLWarning connection_getWarnings(ConnectionProxy connection) throws SQLException { if (this.pos < filterSize) { return nextFilter() .connection_getWarnings(this, connection); } return connection.getRawObject() .getWarnings(); }
private void printSQLWarnings() { if (logger.isDebugEnabled()) { try { SQLWarning warning = handle.getConnection().getWarnings(); while (warning != null) { logger.debug("[SQL WARNING] {}", warning); warning = warning.getNextWarning(); } handle.getConnection().clearWarnings(); } catch (final SQLException e) { logger.debug("Error whilst retrieving SQL warnings", e); } } }
@Override public SQLWarning getWarnings() throws SQLException { TestObjectStoreInitRetry.debugTrace(); return _baseConn.getWarnings(); }
private void processWarnings(final boolean forced) throws SQLException { if (--warningCheckCounter == 0 || forced) { warningCheckCounter = CHECK_WARNINGS_AFTER_COUNT; for (SQLWarning w = connection().getWarnings(); w != null; w = w.getNextWarning()) { LOGGER.debug("Server-side message: '{}', state = {}, code = {}", w.getMessage(), w.getSQLState(), w.getErrorCode()); } } } };
@Test public void testExecuteQueryWarnings() throws SQLException { try (ResultSet rs = statement.executeQuery("SELECT a FROM (VALUES 1, 2, 3) t(a)")) { assertNull(statement.getConnection().getWarnings()); assertNull(statement.getWarnings()); assertNull(rs.getWarnings()); Set<WarningEntry> currentWarnings = new HashSet<>(); while (rs.next()) { assertWarnings(rs.getWarnings(), currentWarnings); } TestingWarningCollectorConfig warningCollectorConfig = new TestingWarningCollectorConfig().setPreloadedWarnings(PRELOADED_WARNINGS).setAddWarnings(true); TestingWarningCollector warningCollector = new TestingWarningCollector(new WarningCollectorConfig(), warningCollectorConfig); List<PrestoWarning> expectedWarnings = warningCollector.getWarnings(); for (PrestoWarning prestoWarning : expectedWarnings) { assertTrue(currentWarnings.contains(new WarningEntry(new PrestoSqlWarning(prestoWarning)))); } } }
/** * Print out any warnings that exist for the current connection. */ void showWarnings() { try { if (getDatabaseConnection().getConnection() == null || !getOpts().getVerbose()) { return; } showWarnings(getDatabaseConnection().getConnection().getWarnings()); } catch (Exception e) { handleException(e); } }