I'm reading the documentation for 'Client side computed columns' and looking at our non-jOOQ codebase and how it could be useful. As of yet, I see two use cases: 1) simplifying (and caching) 'count(*) filter' queries. 2) simplifying (and caching) joins, or the result of multiset(is that possible?).
The VIRTUAL part is clear. jOOQ will render an additional select-part when fetching the the column.
When using STORED how can I trigger the computation of a specific(or all) STORED columns? An an example, suppose I have:
create table books (....)
create table author (id, name, books_count)
Where books_count is a client side computed column with the expression (select count(*) where book.author_id = id)
In Java code I might have:
BOOK.insert(....)
I don't see how this code will trigger the update on the author table 🤔.
I assumed there would be an API such as:
AUTHOR.where(...).recomputeColumns()
But I couldn't find it
Regards