[Mulgara-svn] r1835 - trunk/src/jar/resolver/java/org/mulgara/resolver

alexhall at mulgara.org alexhall at mulgara.org
Thu Nov 12 14:32:29 UTC 2009


Author: alexhall
Date: 2009-11-12 06:32:28 -0800 (Thu, 12 Nov 2009)
New Revision: 1835

Modified:
   trunk/src/jar/resolver/java/org/mulgara/resolver/ModifyGraphOperation.java
Log:
Allow any ConstructQuery to be used as the basis for an insert/select or delete/select, not just those with 3 terms in the pattern.  This is not accessible through parsed TQL or SPARQL queries, but can be easily done via the Connection API.

Modified: trunk/src/jar/resolver/java/org/mulgara/resolver/ModifyGraphOperation.java
===================================================================
--- trunk/src/jar/resolver/java/org/mulgara/resolver/ModifyGraphOperation.java	2009-11-12 09:07:54 UTC (rev 1834)
+++ trunk/src/jar/resolver/java/org/mulgara/resolver/ModifyGraphOperation.java	2009-11-12 14:32:28 UTC (rev 1835)
@@ -141,9 +141,9 @@
     if (query == null) {
       throw new IllegalArgumentException("Null \"query\" parameter");
     }
-    if (query.getVariableList().size() != 3) {
+    if (!(query.getVariableList().size() == 3 || query instanceof ConstructQuery)) {
       throw new QueryException(
-          "Invalid select clause in insert/select.  Exactly 3 terms required");
+          "Invalid select clause in insert/select.  Exactly 3 terms (or ConstructQuery) required");
     }
 
     // Validate "databaseSession" parameter




More information about the Mulgara-svn mailing list