Skip to content

H4kt/Xposed

Repository files navigation

publish Maven latest version Kotlin

Xposed

Xposed provides additional utilities for Exposed

Installation

Gradle

Kotlin

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>"
}

Usage

Core

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.


Datetime

Adds an easy way of specifing the default value for LocalDateTime columns via defaultNow(TimeZone) and defaultNowUTC


Codegen (Experimental)

Codegen module allows you to automatically generate a DTO, repository interface and implementation for your models/entities.

build.gradle.kts

plugins {
    kotlin("jvm") version "1.9.22"
    id("com.google.devtools.ksp") version "1.9.22-1.0.16"
}

Apply Xposed symbol processor

build.gradle.kts

dependencies {
    ksp("dev.h4kt.xposed:xposed-codegen:1.1.0")
    implementation("dev.h4kt.xposed:xposed-codegen:1.1.0")
}

Annotate your model

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

About

A simple utility library for Exposed

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages