private String getProperty( String key, IDatabaseConnection databaseConnection ) { return databaseConnection.getExtraOptions().get( getDatabaseType().getShortName() + "." + key ); }
attributes = databaseConnection.getExtraOptions(); for ( String key : attributes.keySet() ) { String value = attributes.get( key );
String code = property.getName(); String attribute = property.getString(); databaseConnection.getExtraOptions().put( code, ( attribute == null || attribute.length() == 0 ) ? "" : attribute ); //$NON-NLS-1$
@Override public String getURL( IDatabaseConnection connection ) throws DatabaseDialectException { StringBuffer urlBuffer = new StringBuffer( getNativeJdbcPre() ); /* * String username = connection.getUsername(); if(username != null && !"".equals(username)) { * urlBuffer.append(username); String password = connection.getPassword(); if(password != null && * !"".equals(password)) { urlBuffer.append(":"); urlBuffer.append(password); } urlBuffer.append("@"); } */ urlBuffer.append( connection.getHostname() ); urlBuffer.append( ":" ); urlBuffer.append( connection.getDatabasePort() ); urlBuffer.append( "/" ); urlBuffer.append( connection.getDatabaseName() ); String principalPropertyName = getDatabaseType().getShortName() + ".principal"; String principal = connection.getExtraOptions().get( principalPropertyName ); String extraPrincipal = connection.getAttributes().get( DatabaseConnection.ATTRIBUTE_PREFIX_EXTRA_OPTION + principalPropertyName ); urlBuffer.append( ";impala_db=true" ); if ( principal != null || extraPrincipal != null ) { return urlBuffer.toString(); } urlBuffer.append( ";auth=noSasl" ); return urlBuffer.toString(); }
conn.setPassword( connection.getPassword() ); conn.setQuoteAllFields( connection.isQuoteAllFields() ); conn.setExtraOptions( connection.getExtraOptions() ); conn.setExtraOptionsOrder( connection.getExtraOptionsOrder() ); conn.setStreamingResults( connection.isStreamingResults() );
target.setAccessType( source.getAccessType() ); target.setDatabaseType( source.getDatabaseType() ); target.setExtraOptions( source.getExtraOptions() ); target.setExtraOptionsOrder( source.getExtraOptionsOrder() ); target.setName( source.getName() );
target.setAccessType( source.getAccessType() ); target.setDatabaseType( source.getDatabaseType() ); target.setExtraOptions( source.getExtraOptions() ); target.setExtraOptionsOrder( source.getExtraOptionsOrder() ); target.setName( source.getName() );
connectionImpl .setUsingDoubleDecimalAsSchemaTableSeparator( connectionBean.isUsingDoubleDecimalAsSchemaTableSeparator() ); connectionImpl.setExtraOptions( mapBeanToImpl( connectionBean.getExtraOptions() ) ); connectionImpl.setExtraOptionsOrder( mapBeanToImpl( connectionBean.getExtraOptionsOrder() ) ); return connectionImpl;