filenet-p8filenetfilenet-content-enginefilenet-ce-sql

How should i proper page queries in IBM FileNet?


Are there any methods to page queries in FileNet? I have a grid control with paging so i need to get count of elements total in query and possibility to get in example page 3 of results(with any page size). I found only TOP operator, but are there any SKIP or COUNT?


Solution

  • There is no way to accomplish exactly what you want. The main reason for this is that it is very expensive for Content Engine to count all rows returned by a query (assuming there are thousands of them). There can be quite involved security restrictions that potentially have to be applied to each returned object. This will effectively exclude some objects from query results, affecting the result count. Evaluating effective security permissions on multiple objects would kill the performance, thus avoided. That is why you don't have COUNT or other aggregate functions in the query language.

    If you can restrict the amount of records displayed in the grid to a reasonable number, then COUNT_LIMIT might work for you — see Query Options and getTotalCount(). However, this will require looping through to the required page with its inherent performance drawback.