chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1082908 - /chemistry/site/trunk/content/java/how-to/how-to-process-query.mdtext
Date Fri, 18 Mar 2011 13:17:06 GMT
Author: jens
Date: Fri Mar 18 13:17:06 2011
New Revision: 1082908

URL: http://svn.apache.org/viewvc?rev=1082908&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=1082908&r1=1082907&r2=1082908&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:17:06
2011
@@ -138,6 +138,26 @@ implementation:
 
     :::java
     public void onLessThan(Tree ltNode, Tree leftNode, Tree rightNode) {
+    
+        Object rVal = onLiteral(rightChild);
+        ColumnReference colRef;
+    
+        CmisSelector sel = queryObj.getColumnReference(columnNode
+			     .getTokenStartIndex());
+    
+        if (null == sel)
+           throw new RuntimeException("Unknown property query name " +
+		          columnNode.getChild(0));
+        else if (sel instanceof ColumnReference)
+           colRef = (ColumnReference) sel;
+    
+    
+       TypeDefinition td = colRef.getTypeDefinition();
+       PropertyDefinition pd =
+           td.getPropertyDefinitions().get(colRef.getPropertyId());
+        
+       // … process the statement, for example append it to a WHERE
+       // in your generated SQL statement.
     }
 
 



Mime
View raw message