jdbcFeatureStore
Creates a JDBC-backed FeatureStore that auto-detects the database type.
The database type is detected using JDBC metadata from the DataSource. The feature table is created automatically if it doesn't exist.
Example:
val store = jdbcFeatureStore(HikariDataSource(config))
store += Feature(uid = "my-feature", isEnabled = true)For custom FlippingStrategy or Property implementations:
val customModule = SerializersModule {
polymorphic(FlippingStrategy::class) {
subclass(MyCustomStrategy::class, MyCustomStrategy.serializer())
}
}
val store = jdbcFeatureStore(dataSource, customModule)Parameters
The JDBC DataSource for database connections.
Optional serializers for custom types.
The CoroutineDispatcher to use for blocking JDBC operations. Defaults to Dispatchers.IO.
Throws
If the database type is not supported.
Creates a JDBC-backed FeatureStore with an explicit SQL dialect.
Use this when automatic detection doesn't work (e.g., database proxies).
Parameters
The JDBC DataSource for database connections.
The SqlDialect for SQL statements.
Optional serializers for custom types.
The CoroutineDispatcher to use for blocking JDBC operations. Defaults to Dispatchers.IO.