Created
November 17, 2022 21:14
-
-
Save MavoCz/c63ec55ad867918df649e5c63df5b889 to your computer and use it in GitHub Desktop.
Update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun update(id: Long, updatedRecord: R) { | |
val count = dsl.update(table) | |
.set(updatedRecord) | |
.where(idField.eq(id)) | |
.execute() | |
if (count != 1) throw NotFoundException("No record was updated") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment