Hi,
I'm new to jooq and trying to do the following. I wanted to insert a data into the table. I'm running the following code in a transaction:
dslContext.transaction(configuration -> {
DSLContext ctx = DSL.using(configuration);
ctx
.insertInto(USERDATA,USERDATA.USERNAME,USERDATA.PASSWORD)
.values(username,password)
.returning()
.fetchOne();
});
Now I want to understand that within a transaction how will I come to know if the code inside it was successful or not? (only with exceptions). How to do that? Also let me know how to get to know about exceptions, say if an exception occurs on duplicate value etc.
Thanks for your response.