Skip to content

a simple wrapper around the driver implementation for the jvm to simplify the usage of migrations etc.

License

Notifications You must be signed in to change notification settings

molikuner/sqldelight-simple-jvm-driver

Repository files navigation

sqldelight-simple-jvm-driver

Download Build Status License

a simple wrapper around the driver implementation for the jvm of SQLDelight to simplify the usage of migrations etc.

setup

dependencies {
    ...
    implementation("com.molikuner.sqldelight:simple-jvm-driver:$sqldelightVersion")
    ...
}

usage

val driver: SqlDriver = JvmSqliteDriver(Database.Schema, "test.db")

by using this driver wrapper you get automatic migrations. you don't need to save anthing about your db except the db itself and the lib will migrate your schema if a newer version is available. at initial creation of the db the current schema will be applied and afterwards with every new migration it will be migrated. just as simple as the android driver.

versioning

as this is just a simple wrapper around the official SQLDelight jvm driver this library uses the same versioning as the underlying driver implementation. this also means, that there will be one release of this lib per release of SQLDelight.

releasing

  1. create tag on new commit
  2. push to github and wait for drone to finish build
  3. publish by clicking deploy or running drone promote molikuner/sqldelight-simple-jvm-driver <buildNumber> <version>
  4. upload the .asc files from bintray to github release
  5. press publish on github

if drone build/promote fails, these steps are needed to do it manually:

  1. open build.gradle.kts and replace the following: in the bintray section

    1. user with molikuner
    2. key with the api key from my user profile of bintray
    3. the gpg passphrase with the passphrase from my password manager
  2. run ./gradlew bintrayUpload

  3. upload all files from build/repository/com/molikuner/sqldelight/simple-jvm-driver/<version>/ to the github release

About

a simple wrapper around the driver implementation for the jvm to simplify the usage of migrations etc.

Topics

Resources

License

Stars

Watchers

Forks

Languages