Skip to content

Latest commit

 

History

History

kairo-updater

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

kairo-updater

Refer to the kairo-sample repository to see it in action.

A utility library for updating existing entities that supports Optionals to differentiate between null and undefined from the frontend.

Used by kairo-sql-feature.

Usage

Step 1: Include the dependency

// build.gradle.kts

dependencies {
  implementation("kairo:kairo-updater:$kairoVersion")
}

Step 2: Use it

// src/main/kotlin/yourPackage/.../YourFile.kt

Updater { existing ->
  LibraryBookModel.Update(
    title = update(existing.title, update.title),
    author = update(existing.author, update.author),
  )
}