I've been using the new QueryBuilder in Servoy with great success- I'm using it with the Velocity webclient to drive a RESTful API - generally I'll decode a querystring from a request and loop through it to build a Query.
The only problem I've not been able to sort out yet is abstracting the standard pagination functionality - something like /employees?limit=50&offset=50 or /employees?page=1
The current functional yet ugly solution is to build the query, load the foundset, set the specified index, loop through the foundset for limit number of times and copy the record into an array for return.
I don't see any public references but I assume standard foundset lazy-loading is doing something similar in the backend, so perhaps it could be exposed?
Any suggestions? It would be most excellent to be able to do something like:
- Code: Select all
_query.add.limit(50);
_query.add.offset(50);