[xwiki-devs] Query Generator review
Hi, devs. I have a small review of XWIKI-1090: XWiki Query Generator, XWikiQuery/makeQuery in order to move it to new XWQLanguage instead of old QueryPlugin.
This features allows to generate a Query UI and the corresponding query automatically to run on the storage engine. The displaySearch APIs allow to display the query UI and makeQuery allow to generate the query
It is easy to rewrite syntax to XWQL, but there are some problems in design. 1. To make it run on XWQL we just need to replace QueryPlugin#makeQuery with something similar. I propose: 1.1 move XWikiCriteria to xwiki-query/manager module (it is not depend on core. except only one util method) 1.2 add Query QueryManager#createQuery(XWikiCriteria) as analogue to QueryPlugin#makeQuery 1.3 fix all affected references. There are one method that need be bridged (xwiki-bridge) for this: BaseClass#makeQuery. I don't like to bridge it, so looking other ways. 2. General overview of query generator: It is very connected with core and distributed across many classes. This is not good for our component architecture. There are: UI Generator: XWiki#displaySearch* PropertyClass#displaySearch* and overrides XWikiDocument#displaySearch Query Generator: XWiki#createQueryFromRequest BaseClass#makeQuery PropertyClass#makeQuery, #fromSearchMap and overrides Executers: XWiki#search*(XWikiQuery, ...) I'm doing 1. now. Query Generator redesign(2) is not important for now, I think. It works well.
Hi, devs. There is a demo for QueryGenerator based on old QueryPlugin: http://incubator.myxwiki.org/xwiki/bin/view/Main/QueryGenerator It is Ludovic's code. Query on some classes don't works. Will investigate later. Artem Melentyev wrote:
...
Artem Melentyev wrote:
Hi, devs.
There is a demo for QueryGenerator based on old QueryPlugin: http://incubator.myxwiki.org/xwiki/bin/view/Main/QueryGenerator It is Ludovic's code. Query on some classes don't works. Will investigate later.
I can't quite get it to work. The results all look like $itemdoc.get($field.replaceAll("${classname}_","")), and it seems that results from all wikis (in a farm) are returned. The form should not be sent using GET, as the URL gets pretty big and might exceed the 4k limit most servers impose as a default. -- Sergiu Dumitriu http://purl.org/net/sergiu/
Hello, For the UI itself, maybe the filter builder from smartGWT could be useful here : http://www.smartclient.com/smartgwt/showcase/#featured_filter_builder_grid Jerome. Artem Melentyev wrote:
Hi, devs.
I have a small review of XWIKI-1090: XWiki Query Generator, XWikiQuery/makeQuery in order to move it to new XWQLanguage instead of old QueryPlugin.
This features allows to generate a Query UI and the corresponding query automatically to run on the storage engine. The displaySearch APIs allow to display the query UI and makeQuery allow to generate the query
It is easy to rewrite syntax to XWQL, but there are some problems in design.
1. To make it run on XWQL we just need to replace QueryPlugin#makeQuery with something similar. I propose:
1.1 move XWikiCriteria to xwiki-query/manager module (it is not depend on core. except only one util method)
1.2 add Query QueryManager#createQuery(XWikiCriteria) as analogue to QueryPlugin#makeQuery
1.3 fix all affected references.
There are one method that need be bridged (xwiki-bridge) for this: BaseClass#makeQuery. I don't like to bridge it, so looking other ways.
2. General overview of query generator:
It is very connected with core and distributed across many classes. This is not good for our component architecture. There are: UI Generator: XWiki#displaySearch* PropertyClass#displaySearch* and overrides XWikiDocument#displaySearch
Query Generator: XWiki#createQueryFromRequest BaseClass#makeQuery PropertyClass#makeQuery, #fromSearchMap and overrides
Executers: XWiki#search*(XWikiQuery, ...)
I'm doing 1. now. Query Generator redesign(2) is not important for now, I think. It works well. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (3)
-
Artem Melentyev -
Jerome Velociter -
Sergiu Dumitriu