io.quarkus.jdbc.oracle.runtime.OracleServiceBindingConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-jdbc-oracle Show documentation
Show all versions of quarkus-jdbc-oracle Show documentation
Connect to the Oracle database via JDBC
The newest version!
package io.quarkus.jdbc.oracle.runtime;
import java.util.List;
import java.util.Optional;
import io.quarkus.kubernetes.service.binding.runtime.DatasourceServiceBindingConfigSourceFactory;
import io.quarkus.kubernetes.service.binding.runtime.ServiceBinding;
import io.quarkus.kubernetes.service.binding.runtime.ServiceBindingConfigSource;
import io.quarkus.kubernetes.service.binding.runtime.ServiceBindingConverter;
public class OracleServiceBindingConverter implements ServiceBindingConverter {
@Override
public Optional convert(List serviceBindings) {
return ServiceBinding.singleMatchingByType("oracle", serviceBindings)
.map(new DatasourceServiceBindingConfigSourceFactory.Jdbc("jdbc:%s:thin:@%s%s/%s"));
}
}