Skip to content

Instantly share code, notes, and snippets.

@MavoCz
Created November 17, 2022 21:14
Show Gist options
  • Save MavoCz/c63ec55ad867918df649e5c63df5b889 to your computer and use it in GitHub Desktop.
Save MavoCz/c63ec55ad867918df649e5c63df5b889 to your computer and use it in GitHub Desktop.
Update
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