QueryBuilder:How to refine the existing query

Questions and answers for designing and implementing forms in Servoy

QueryBuilder:How to refine the existing query

Postby lsjiang » Sat Apr 06, 2013 7:13 am

Hi,
I have a foundset which needs to be filtered. I used to use foundset.find() and foundset.search(false,true) to get a subset of the current foundset. Now I'm using QueryBuilder. I'm not clear that query.where.add(query.columns.aCoulumnName.eq(...)) will extend the query or refine the query? If it extends the query then how to refine it?

Thanks,
lsjiang
 
Posts: 8
Joined: Fri Aug 29, 2008 9:36 pm

Re: QueryBuilder:How to refine the existing query

Postby lopamudram » Thu Apr 11, 2013 1:24 pm

Hello lsjiang

The query from Query Builder will not extend the query result from a find and search operation. But if you are doing find and search after filtering with query builder it will extend the query from Query Builder if reduced search parameter is set to true (foundset.search(false,true)). You can check it by comparing query result for foundset after each operation using "databaseManager.getSQL(foundset)".

Hope this helps.

Regards
Lopamudra
http://www.mindfiresolutions.com/
lopamudram
 
Posts: 20
Joined: Wed May 02, 2012 12:05 pm


Return to Forms

Who is online

Users browsing this forum: No registered users and 5 guests

cron