← Back to Stormify Documentation

Stormify

@JvmName(name = "fromAndroidSQLiteDatabase")
fun Stormify(db: SQLiteDatabase): Stormify

Creates a Stormify instance from an Android SQLiteDatabase.

This is a convenience function for Android that automatically wraps the Android SQLiteDatabase into a KDBC DataSource interface.

Usage

val db = context.openOrCreateDatabase("mydb.db", Context.MODE_PRIVATE, null)
val stormify = Stormify(db)
@JvmName(name = "fromJdbcDataSource")
fun Stormify(jdbcDataSource: DataSource, vararg registrars: EntityRegistrar): Stormify

Creates a Stormify instance from a JDBC DataSource.

This is a convenience function for JVM/Kotlin that automatically wraps the javax.sql.DataSource into a KDBC DataSource interface.

Usage

val hikariDS = HikariDataSource(config)
val stormify = Stormify(hikariDS)