Update rows counter
- Update if table row count is changed
- Update if views were adjusted (filtering changed, new/edited/deleted rows, ...) Nearly everything could trigger the rows count. 🙄
The main problem here is that we trigger N+1 selects in almost all operations like listing tables which tends to end up in rather complex queries depending on the table or filtering on views
https://github.com/nextcloud/tables/blob/main/lib/Service/TableService.php#L197 https://github.com/nextcloud/tables/blob/main/lib/Service/ViewService.php#L413
I'm not entirely sure what the better approach would be, either store a counter directly next to the view or rather a caching layer, but we should be able to properly update the row count in cases rows are added/removed. For views this would be more tricky as the number of rows on a view could change if either the view filters are updated or if any value of a row changes.