Refer to the kairo-sample repository to see it in action.
A utility library for updating existing entities
that supports Optional
s to differentiate between null
and undefined
from the frontend.
Used by kairo-sql-feature.
// build.gradle.kts
dependencies {
implementation("kairo:kairo-updater:$kairoVersion")
}
// src/main/kotlin/yourPackage/.../YourFile.kt
Updater { existing ->
LibraryBookModel.Update(
title = update(existing.title, update.title),
author = update(existing.author, update.author),
)
}