https://github.com/molikuner/sqldelight-simple-jvm-driver
a simple wrapper around the driver implementation for the jvm to simplify the usage of migrations etc.
https://github.com/molikuner/sqldelight-simple-jvm-driver
hacktoberfest kotlin sqldelight
Last synced: 2 months ago
JSON representation
a simple wrapper around the driver implementation for the jvm to simplify the usage of migrations etc.
- Host: GitHub
- URL: https://github.com/molikuner/sqldelight-simple-jvm-driver
- Owner: molikuner
- License: apache-2.0
- Created: 2019-09-02T14:41:10.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-08-21T19:33:10.000Z (almost 3 years ago)
- Last Synced: 2025-02-04T19:49:37.194Z (4 months ago)
- Topics: hacktoberfest, kotlin, sqldelight
- Language: Kotlin
- Homepage:
- Size: 104 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# sqldelight-simple-jvm-driver
[ ](https://bintray.com/molikuner/maven-extensions/sqldelight-simple-jvm-driver/_latestVersion)
[](https://cloud.drone.io/molikuner/sqldelight-simple-jvm-driver)
[](https://opensource.org/licenses/Apache-2.0)a simple wrapper around the driver implementation for the jvm of [SQLDelight](https://github.com/cashapp/sqldelight) to simplify the usage of migrations etc.
## setup
```gradle
dependencies {
...
implementation("com.molikuner.sqldelight:simple-jvm-driver:$sqldelightVersion")
...
}
```## usage
```Kotlin
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](https://github.com/cashapp/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 `
4. upload the `.asc` files from bintray to github release
5. press publish on githubif [drone](https://cloud.drone.io) 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 manager2. run `./gradlew bintrayUpload`
3. upload all files from `build/repository/com/molikuner/sqldelight/simple-jvm-driver//` to the github release