Skip to content

Commit

Permalink
Macros should now work with Sparql update statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Aklakan committed Oct 30, 2024
1 parent 7d0c640 commit cfe2c2f
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@
import org.aksw.jena_sparql_api.sparql.ext.url.JenaUrlUtils;
import org.aksw.jenax.arq.picocli.CmdMixinArq;
import org.aksw.jenax.arq.util.dataset.HasDataset;
import org.aksw.jenax.arq.util.query.QueryTransform;
import org.aksw.jenax.arq.util.security.ArqSecurity;
import org.aksw.jenax.arq.util.syntax.QueryUtils;
import org.aksw.jenax.arq.util.update.UpdateRequestUtils;
import org.aksw.jenax.arq.util.update.UpdateTransform;
import org.aksw.jenax.arq.util.update.UpdateUtils;
Expand Down Expand Up @@ -75,6 +73,8 @@
import org.aksw.jenax.sparql.query.rx.RDFDataMgrEx;
import org.aksw.jenax.stmt.core.SparqlStmt;
import org.aksw.jenax.stmt.core.SparqlStmtMgr;
import org.aksw.jenax.stmt.core.SparqlStmtTransform;
import org.aksw.jenax.stmt.core.SparqlStmtTransforms;
import org.aksw.jenax.stmt.core.SparqlStmtUpdate;
import org.aksw.jenax.stmt.resultset.SPARQLResultEx;
import org.aksw.jenax.stmt.util.SparqlStmtUtils;
Expand Down Expand Up @@ -600,8 +600,10 @@ public Expr transform(ExprFunctionN func, ExprList args) {
return UserDefinedFunctions.expandMacro(udfRegistry, func.copy(args));
}
};
QueryTransform qform = q -> QueryUtils.rewrite(q, op -> Transformer.transform(null, eform, op));
dataSourceTmp = RdfDataEngines.wrapWithQueryTransform(dataSourceTmp, qform, null);
SparqlStmtTransform stmtTransform = SparqlStmtTransforms.ofExprTransform(eform);
dataSourceTmp = RdfDataEngines.wrapWithStmtTransform(dataSourceTmp, stmtTransform);
// QueryTransform qform = q -> QueryUtils.rewrite(q, op -> Transformer.transform(null, eform, op));
// dataSourceTmp = RdfDataEngines.wrapWithQueryTransform(dataSourceTmp, qform, null);
}

RdfDataEngine datasetAndDelete = dataSourceTmp;
Expand Down

0 comments on commit cfe2c2f

Please sign in to comment.