Interface LegacySQLClientProvider<P extends io.vertx.ext.jdbc.spi.DataSourceProvider>

Type Parameters:
P - Type of DataSource provider
All Superinterfaces:
JDBCExtension<P>, SQLClientOptionParser<io.vertx.core.json.JsonObject>, SQLClientProvider<io.vertx.ext.sql.SQLClient>
All Known Subinterfaces:
JDBCLegacyAgroalProvider, JDBCLegacyC3P0Provider, JDBCLegacyHikariProvider

public interface LegacySQLClientProvider<P extends io.vertx.ext.jdbc.spi.DataSourceProvider> extends SQLClientProvider<io.vertx.ext.sql.SQLClient>, SQLClientOptionParser<io.vertx.core.json.JsonObject>, JDBCExtension<P>
A provider provides legacy SQL client that relies on an external JDBC connection pool.

Some well-known JDBC connection pool libs are: c3p0, HikariCP, and Agroal. These are official support by Vert.x.

Since:
2.0.0
See Also:
  • DataSourceProvider
  • SQLClient
  • JDBCClient
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.github.zero88.jooqx.provider.JDBCExtension

    JDBCExtension.AgroalExtension, JDBCExtension.C3P0Extension, JDBCExtension.HikariCPExtension
  • Method Summary

    Modifier and Type
    Method
    Description
    default @NotNull io.vertx.core.Future<Void>
    close(io.vertx.ext.sql.SQLClient sqlClient)
    Close SQL client
    default @NotNull io.vertx.core.Future<io.vertx.ext.sql.SQLClient>
    open(io.vertx.core.Vertx vertx, io.vertx.core.json.JsonObject connOptions, @Nullable io.vertx.core.json.JsonObject poolOptions)
    Create and open SQL client
    default @NotNull io.vertx.core.json.JsonObject
    parseConn(@NotNull io.vertx.core.json.JsonObject connOptions)
    Parse a json SQL connection options to the specific connection options depends on SQL driver
    default @NotNull io.vertx.sqlclient.PoolOptions
    parsePool(@Nullable io.vertx.core.json.JsonObject poolOptions)
    Parse a json SQL pool options
    default String
    Defines SQL client class.

    Methods inherited from interface io.github.zero88.jooqx.provider.JDBCExtension

    dataSourceProviderClass, jdbcDataSourceClass, optimizeDataSourceProviderConfig
  • Method Details

    • sqlClientClass

      default String sqlClientClass()
      Description copied from interface: SQLClientProvider
      Defines SQL client class.

      It helps for detecting and scanning in runtime

      Specified by:
      sqlClientClass in interface SQLClientProvider<P extends io.vertx.ext.jdbc.spi.DataSourceProvider>
      Returns:
      SQL client class
    • open

      @NotNull default @NotNull io.vertx.core.Future<io.vertx.ext.sql.SQLClient> open(io.vertx.core.Vertx vertx, io.vertx.core.json.JsonObject connOptions, @Nullable @Nullable io.vertx.core.json.JsonObject poolOptions)
      Description copied from interface: SQLClientProvider
      Create and open SQL client
      Specified by:
      open in interface SQLClientProvider<P extends io.vertx.ext.jdbc.spi.DataSourceProvider>
      Parameters:
      vertx - vertx
      connOptions - SQL connection options
      poolOptions - SQL pool options
      Returns:
      the SQL client future
    • close

      @NotNull default @NotNull io.vertx.core.Future<Void> close(io.vertx.ext.sql.SQLClient sqlClient)
      Description copied from interface: SQLClientProvider
      Close SQL client
      Specified by:
      close in interface SQLClientProvider<P extends io.vertx.ext.jdbc.spi.DataSourceProvider>
      Parameters:
      sqlClient - SQL client
      Returns:
      void future
    • parseConn

      @NotNull default @NotNull io.vertx.core.json.JsonObject parseConn(@NotNull @NotNull io.vertx.core.json.JsonObject connOptions)
      Description copied from interface: SQLClientOptionParser
      Parse a json SQL connection options to the specific connection options depends on SQL driver
      Specified by:
      parseConn in interface SQLClientOptionParser<P extends io.vertx.ext.jdbc.spi.DataSourceProvider>
      Parameters:
      connOptions - SQL connection option
      Returns:
      a specific SQL connection option
    • parsePool

      @NotNull default @NotNull io.vertx.sqlclient.PoolOptions parsePool(@Nullable @Nullable io.vertx.core.json.JsonObject poolOptions)
      Description copied from interface: SQLClientOptionParser
      Parse a json SQL pool options
      Specified by:
      parsePool in interface SQLClientOptionParser<P extends io.vertx.ext.jdbc.spi.DataSourceProvider>
      Parameters:
      poolOptions - SQL pool options
      Returns:
      a SQL pool option
      See Also:
      • PoolOptions