You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by je...@apache.org on 2011/03/18 14:15:44 UTC

svn commit: r1082907 - /chemistry/site/trunk/content/java/how-to/how-to-process-query.mdtext

Author: jens
Date: Fri Mar 18 13:15:43 2011
New Revision: 1082907

URL: http://svn.apache.org/viewvc?rev=1082907&view=rev
Log:
Trying to debug failing page

Modified:
    chemistry/site/trunk/content/java/how-to/how-to-process-query.mdtext

Modified: chemistry/site/trunk/content/java/how-to/how-to-process-query.mdtext
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/how-to/how-to-process-query.mdtext?rev=1082907&r1=1082906&r2=1082907&view=diff
==============================================================================
--- chemistry/site/trunk/content/java/how-to/how-to-process-query.mdtext (original)
+++ chemistry/site/trunk/content/java/how-to/how-to-process-query.mdtext Fri Mar 18 13:15:43 2011
@@ -136,7 +136,9 @@ example the statement
 will result in calling the method `onLessThan()` in your walker callback
 implementation:
 
-
+    :::java
+    public void onLessThan(Tree ltNode, Tree leftNode, Tree rightNode) {
+    }
 
 
 The right child node is a literal and you will get an Integer object with
@@ -147,3 +149,17 @@ your type system. The query object maint
 references. The key to the map is always the token index in the incoming
 token stream (an integer value). You can get the token index for each node
 by calling `getTokenStartIndex()` on the node.
+
+## Building the result list
+
+After processing the query an `ObjectList` has to be returned containing the
+requested properties and function results. You can ask the query object for
+the requested information:
+
+    :::java
+    Map props = queryObj.getRequestedProperties();
+    Map funcs = queryObj.getRequestedFuncs();
+
+
+Key of the map is the query name and value is the alias if an alias was
+used in the statement or the query name otherwise.