Xposed provides additional utilities for Exposed
repositories {
maven("https://repo.h4kt.dev/releases")
}
dependencies {
implementation("dev.h4kt.xposed:xposed-<module>:<version>")
}
Groovy
You should really switch to Kotlin DSL, you know?
Nevertheless
repositories {
maven {
url "https://repo.h4kt.dev/releases"
}
}
dependencies {
implementation "dev.h4kt.xposed:xposed-<module>:<version>"
}
Adds additional SQL operations like: DISTINCT ON
, TRUNC
, EXTRACT
A cleaner way to initialize transactions: suspendedTransaction
and suspendedTransactionIfNotInOne
which creates a transaction only if called outside of a transaction scope.
Adds an easy way of specifing the default value for LocalDateTime
columns via defaultNow(TimeZone)
and defaultNowUTC
Codegen module allows you to automatically generate a DTO, repository interface and implementation for your models/entities.
Install KSP Gradle Plugin
build.gradle.kts
plugins {
kotlin("jvm") version "1.9.22"
id("com.google.devtools.ksp") version "1.9.22-1.0.16"
}
build.gradle.kts
dependencies {
ksp("dev.h4kt.xposed:xposed-codegen:1.1.0")
implementation("dev.h4kt.xposed:xposed-codegen:1.1.0")
}
import dev.h4kt.xposed.codegen.annotations.Model
@Model
object Users : UUIDTable("user") {}
After completing all of the above steps Xposed will generate the following:
- DTO class for Users table
UserDto
- Repository interface class
UserRepository
- A basic implementation of it
XposedUserRepository