You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I'm using your amazing project to manage calls from an external program to a database, and have found out that it is desirable for this "frontend" to receive the total number of elements I have in my database after each pagination-slice call. Up to now I was doing something like this:
var queryResult = modelPaginationService.executeQuery(pageRequest, filter, ...);
var numElements = myDataBase.countNumElements(filter);
But I'm experiencing inconsistencies when the actual number of elements in the database changes between the two lines above (due to treacherous insertions taking place at this delicate moment...).
By going through your code, I've seen that I could overcome this situation if I got both results from a single database query, i.e., something akin to
I know that "entitiesSizeFromContinuationTokenToEnd" and the "numElements" I had in the first code snippet are not exactly the same thing, but that is not really a problem, the external program could work just fine using this number, the only important thing here is for the returned (CursorPaginationSlice, "size") pair to remain always 100% coherent.
Would you consider adding this useful return value to CursorPaginationService.executeQuery?
Thak you very much for your attention, regards,
Diego
The text was updated successfully, but these errors were encountered:
Hi! I'm using your amazing project to manage calls from an external program to a database, and have found out that it is desirable for this "frontend" to receive the total number of elements I have in my database after each pagination-slice call. Up to now I was doing something like this:
But I'm experiencing inconsistencies when the actual number of elements in the database changes between the two lines above (due to treacherous insertions taking place at this delicate moment...).
By going through your code, I've seen that I could overcome this situation if I got both results from a single database query, i.e., something akin to
I know that "entitiesSizeFromContinuationTokenToEnd" and the "numElements" I had in the first code snippet are not exactly the same thing, but that is not really a problem, the external program could work just fine using this number, the only important thing here is for the returned (CursorPaginationSlice, "size") pair to remain always 100% coherent.
Would you consider adding this useful return value to CursorPaginationService.executeQuery?
Thak you very much for your attention, regards,
Diego
The text was updated successfully, but these errors were encountered: