jvmMain.com.ditchoom.mqtt3.persistence.SqlDriver.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mqtt-4-models Show documentation
Show all versions of mqtt-4-models Show documentation
Defines the MQTT 3 and 4 control packets
package com.ditchoom.mqtt3.persistence
import app.cash.sqldelight.db.SqlDriver
import app.cash.sqldelight.driver.jdbc.sqlite.JdbcSqliteDriver
import com.ditchoom.Mqtt4
actual fun sqlDriver(androidContext: Any?, name: String, inMemory: Boolean): SqlDriver? {
val driver = JdbcSqliteDriver(if (inMemory) JdbcSqliteDriver.IN_MEMORY else "jdbc:sqlite:file:$name")
Mqtt4.Schema.create(driver)
return driver
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy