Interface SqlConfig

All Superinterfaces:
Prototype.Api
All Known Subinterfaces:
JpaPersistenceUnitConfig, io.helidon.data.jakarta.persistence.JpaPersistenceUnitConfigBlueprint
All Known Implementing Classes:
JpaPersistenceUnitConfig.BuilderBase.JpaPersistenceUnitConfigImpl, SqlConfig.BuilderBase.SqlConfigImpl

public interface SqlConfig extends Prototype.Api
SQL specific configuration. Database connection may be configured using connection string, username and password or using DataSource name. Database connection must be configured by exactly one of the options mentioned above.
See Also:
  • Method Details

    • builder

      static SqlConfig.Builder builder()
      Create a new fluent API builder to customize configuration.
      Returns:
      a new builder
    • builder

      static SqlConfig.Builder builder(SqlConfig instance)
      Create a new fluent API builder from an existing instance.
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • create

      @Deprecated static SqlConfig create(Config config)
      Create a new instance from configuration.
      Parameters:
      config - used to configure the new instance
      Returns:
      a new instance configured from configuration
    • create

      static SqlConfig create(Config config)
      Create a new instance from configuration.
      Parameters:
      config - used to configure the new instance
      Returns:
      a new instance configured from configuration
    • connection

      Optional<ConnectionConfig> connection()
      Configuration of a connection to a database. Alternative is to use SqlConfig.BuilderBase.dataSource().
      Returns:
      connection configuration
    • dataSource

      Optional<String> dataSource()
      Name of the DataSource.
      Returns:
      the name to use for DataSource lookup