I need to fetch a certain entry from a database, and then delete that entry. I was wondering if I could do that in a single call to the database. I am using jOOQ with flyway.
Currently I have
database.write(context -> context.data().remove(messageId))
I need to obtain a field starboardMessageId from the record which has the key messageId