Class JdbcStoreProvider

java.lang.Object
me.ahoo.cosid.store.jdbc.JdbcStoreProvider
All Implemented Interfaces:
me.ahoo.cosid.store.StoreProvider

public final class JdbcStoreProvider extends Object implements me.ahoo.cosid.store.StoreProvider
Opens JdbcStores, type jdbc (06-stores.md ยง1), registered with ServiceLoader.

The client is a DataSource; without one the provider connects through DriverManager with options.url, username and password, without a pool. Further options:

  • dialect: the dialect name (mysql, mariadb, postgresql, sqlserver, h2 or one registered as a JdbcDialect); detected from the database by default;
  • initSchema: create the tables that are missing, and the columns and indexes that tables of an earlier 5.0 pre-release lack, false by default;
  • rangeTable, slotTable, namespaceTable: the table names (JdbcTables);
  • fetchPlan: statement (the default) or transaction behind an SQL proxy or read-write splitting (FetchPlan).
StoreConfig.timeout is the queryTimeout of every statement.
  • Field Details

  • Constructor Details

    • JdbcStoreProvider

      public JdbcStoreProvider()
  • Method Details

    • type

      public String type()
      Specified by:
      type in interface me.ahoo.cosid.store.StoreProvider
    • options

      public Set<String> options()
      Specified by:
      options in interface me.ahoo.cosid.store.StoreProvider
    • open

      public me.ahoo.cosid.store.Store open(me.ahoo.cosid.store.StoreConfig config)
      Specified by:
      open in interface me.ahoo.cosid.store.StoreProvider