[Mulgara-svn] r1869 - branches/distinct_queries/jxdata/iTQL/distinct

pag at mulgara.org pag at mulgara.org
Thu Dec 10 13:30:11 UTC 2009


Author: pag
Date: 2009-12-10 05:30:10 -0800 (Thu, 10 Dec 2009)
New Revision: 1869

Added:
   branches/distinct_queries/jxdata/iTQL/distinct/queryResult3.txt
Modified:
   branches/distinct_queries/jxdata/iTQL/distinct/test.jxu
Log:
Added a test for the new nondistinct keyword in TQL

Added: branches/distinct_queries/jxdata/iTQL/distinct/queryResult3.txt
===================================================================
--- branches/distinct_queries/jxdata/iTQL/distinct/queryResult3.txt	                        (rev 0)
+++ branches/distinct_queries/jxdata/iTQL/distinct/queryResult3.txt	2009-12-10 13:30:10 UTC (rev 1869)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<answer xmlns="http://mulgara.org/tql#"><query><variables><person/><email/></variables><solution><person resource="http://test.com/test#Barney"/><email>barney at test.com</email></solution><solution><person resource="http://test.com/test#Fred"/><email>fred at test.com</email></solution><solution><person resource="http://test.com/test#Fred"/><email>fred at test.com</email></solution></query></answer>

Modified: branches/distinct_queries/jxdata/iTQL/distinct/test.jxu
===================================================================
--- branches/distinct_queries/jxdata/iTQL/distinct/test.jxu	2009-12-09 14:57:09 UTC (rev 1868)
+++ branches/distinct_queries/jxdata/iTQL/distinct/test.jxu	2009-12-10 13:30:10 UTC (rev 1869)
@@ -110,6 +110,25 @@
   </ifEqual>
 
 
+  <set name="query" value="
+      select nondistinct ?person ?email
+      from &lt;test:people&gt;
+      where 
+        ?person &lt;rdf:type&gt; &lt;foaf:Person&gt; and
+        ?person &lt;foaf:mbox&gt; ?email and
+        (
+          ?person &lt;foaf:firstName&gt; 'Fred'
+          or
+          ( ?person &lt;http://www.w3.org/2000/10/swap/pim/contact#home&gt; ?h and ?h &lt;http://www.w3.org/2000/10/swap/pim/contact#address&gt; ?a and ?a &lt;http://www.w3.org/2000/10/swap/pim/contact#city&gt; 'Bedrock' )
+        )
+      order by ?person ; "/>
+
+  <eval stepClass="org.mulgara.store.jxunit.QueryJX" />
+  <ifEqual converse="true" file="queryResult3.txt" name="queryResult">
+    <save name="queryResult" file="badQuery3Result.xml"/>
+    <fail>Output failed.  Check badQuery3Result.xml for output.</fail>
+  </ifEqual>
+
   <!-- now drop the graphs -->
   <set name="query" value="drop &lt;test:people&gt;;"/>
   <eval stepClass="org.mulgara.store.jxunit.QueryJX" />




More information about the Mulgara-svn mailing list