Reputation: 149
I am using jOOQ as SQL generator. I could see I am able to get last inserted row using DSLContext.lastID()
. But how do I get underlying db sql string.
ex: For Sqlite SELECT last_insert_rowid()
Upvotes: 1
Views: 870
Reputation: 221145
There isn't any such specific query that you can get from the jOOQ API, short of constructing it yourself, e.g. by using plain SQL:
DSL.using(configuration)
.select(field("last_insert_rowid()", SQLDataType.INTEGER));
Upvotes: 2