@Override public void setClientInfo(Properties properties) throws SQLClientInfoException { targetConnection.setClientInfo(properties); }
@Override public void setClientInfo(String name, String value) throws SQLClientInfoException { targetConnection.setClientInfo(name, value); }
@Override public void setClientInfo(Properties properties) throws SQLClientInfoException { raw.setClientInfo(properties); }
@Override public void setClientInfo(String name, String value) throws SQLClientInfoException { raw.setClientInfo(name, value); }
@Override public void setClientInfo(String name, String value) throws SQLClientInfoException { raw.setClientInfo(name, value); }
@Override public void setClientInfo(Properties properties) throws SQLClientInfoException { raw.setClientInfo(properties); }
@Override public void setClientInfo(Properties properties) throws SQLClientInfoException { connection.setClientInfo(properties); }
@Override public void setClientInfo(Properties properties) throws SQLClientInfoException { if (holder == null) { throw new SQLClientInfoException(); } conn.setClientInfo(properties); }
@Override public void setClientInfo(String name, String value) throws SQLClientInfoException { if (holder == null) { throw new SQLClientInfoException(); } conn.setClientInfo(name, value); }
private void trySetConnectionProperties(Query query, Connection connection) throws SQLException { // Required for jdbc drivers that do not implement all/some of these functions (eg. impala jdbc driver) // For these drivers, set the database default values in the query database try { connection.setClientInfo("ApplicationName", "verifier-rewrite"); connection.setCatalog(catalogOverride.orElse(query.getCatalog())); connection.setSchema(schemaOverride.orElse(query.getSchema())); } catch (SQLClientInfoException ignored) { // Do nothing } }
/** {@inheritDoc} */ @Override public void setClientInfo(Properties properties) throws SQLClientInfoException { conn.setClientInfo(properties); }
@Override public Object call() throws Exception { conn.setClientInfo(props); return null; } }, SQLClientInfoException.class, "Connection is closed");
/** {@inheritDoc} */ @Override public void setClientInfo(String name, String value) throws SQLClientInfoException { conn.setClientInfo(name, value); }
@Override public Object call() throws Exception { conn.setClientInfo(name, val); return null; } }, SQLClientInfoException.class, "Connection is closed");
private void trySetConnectionProperties(Query query, Connection connection) throws SQLException { // Required for jdbc drivers that do not implement all/some of these functions (eg. impala jdbc driver) // For these drivers, set the database default values in the query database try { connection.setClientInfo("ApplicationName", "verifier-test:" + queryPair.getName()); connection.setCatalog(query.getCatalog()); connection.setSchema(query.getSchema()); } catch (SQLClientInfoException ignored) { // Do nothing } }
@Override public void connection_setClientInfo( ConnectionProxy connection, Properties properties) throws SQLClientInfoException { if (this.pos < filterSize) { nextFilter() .connection_setClientInfo(this, connection, properties); return; } connection.getRawObject() .setClientInfo(properties); }
@Override public void connection_setClientInfo( ConnectionProxy connection, String name, String value) throws SQLClientInfoException { if (this.pos < filterSize) { nextFilter() .connection_setClientInfo(this, connection, name, value); return; } connection.getRawObject() .setClientInfo(name, value); }
@Override public void setClientInfo(Properties properties) throws SQLClientInfoException { TestObjectStoreInitRetry.debugTrace(); _baseConn.setClientInfo(properties); }
@Override public void setClientInfo(String name, String value) throws SQLClientInfoException { TestObjectStoreInitRetry.debugTrace(); _baseConn.setClientInfo(name, value); }
@Test public void testApplicationName() throws SQLException { try (Connection connection = createConnection()) { assertConnectionSource(connection, "presto-jdbc"); } try (Connection connection = createConnection()) { connection.setClientInfo("ApplicationName", "testing"); assertConnectionSource(connection, "testing"); } try (Connection connection = createConnection("applicationNamePrefix=fruit:")) { assertConnectionSource(connection, "fruit:"); } try (Connection connection = createConnection("applicationNamePrefix=fruit:")) { connection.setClientInfo("ApplicationName", "testing"); assertConnectionSource(connection, "fruit:testing"); } }