@Override public void configure(Binder binder) { binder.bind(JdbcClient.class).to(MySqlClient.class).in(Scopes.SINGLETON); configBinder(binder).bindConfig(BaseJdbcConfig.class); configBinder(binder).bindConfig(MySqlConfig.class); }
@Inject public MySqlClient(JdbcConnectorId connectorId, BaseJdbcConfig config, MySqlConfig mySqlConfig) throws SQLException { super(connectorId, config, "`", new Driver()); connectionProperties.setProperty("nullCatalogMeansCurrent", "false"); if (mySqlConfig.isAutoReconnect()) { connectionProperties.setProperty("autoReconnect", String.valueOf(mySqlConfig.isAutoReconnect())); connectionProperties.setProperty("maxReconnects", String.valueOf(mySqlConfig.getMaxReconnects())); } if (mySqlConfig.getConnectionTimeout() != null) { connectionProperties.setProperty("connectTimeout", String.valueOf(mySqlConfig.getConnectionTimeout().toMillis())); } }
public void configure(Binder binder) { binder.bind(JdbcClient.class).to(TemplateClient.class).in(Scopes.SINGLETON); configBinder(binder).bindConfig(BaseJdbcConfig.class); configBinder(binder).bindConfig(TemplateConfig.class); }
public void configure(Binder binder) { binder.bind(JdbcClient.class).to(TeradataClient.class).in(Scopes.SINGLETON); configBinder(binder).bindConfig(BaseJdbcConfig.class); configBinder(binder).bindConfig(TeradataConfig.class); }
@Override public void configure(Binder binder) { binder.bind(JdbcClient.class).to(PostgreSqlClient.class).in(Scopes.SINGLETON); configBinder(binder).bindConfig(BaseJdbcConfig.class); }
@Inject public PostgreSqlClient(JdbcConnectorId connectorId, BaseJdbcConfig config) throws SQLException { super(connectorId, config, "\"", new Driver()); }