Skip to content
Snippets Groups Projects
Verified Commit a7e692f5 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: versioned backref

parent 9f1118a9
Branches
Tags
No related merge requests found
...@@ -113,7 +113,7 @@ public class Backreference implements EntityFilterInterface, QueryInterface { ...@@ -113,7 +113,7 @@ public class Backreference implements EntityFilterInterface, QueryInterface {
initBackRef(query); initBackRef(query);
final CallableStatement callApplyBackRef = final CallableStatement callApplyBackRef =
getConnection().prepareCall("call applyBackReference(?,?,?,?,?)"); getConnection().prepareCall("call applyBackReference(?,?,?,?,?,?)");
callApplyBackRef.setString(1, getSourceSet()); // sourceSet callApplyBackRef.setString(1, getSourceSet()); // sourceSet
this.statistics.put("sourceSet", getSourceSet()); this.statistics.put("sourceSet", getSourceSet());
this.statistics.put( this.statistics.put(
...@@ -145,6 +145,7 @@ public class Backreference implements EntityFilterInterface, QueryInterface { ...@@ -145,6 +145,7 @@ public class Backreference implements EntityFilterInterface, QueryInterface {
callApplyBackRef.setNull(4, VARCHAR); callApplyBackRef.setNull(4, VARCHAR);
} }
callApplyBackRef.setBoolean(5, hasSubProperty()); // subQuery? callApplyBackRef.setBoolean(5, hasSubProperty()); // subQuery?
callApplyBackRef.setBoolean(6, this.isVersioned());
executeStmt(query, callApplyBackRef); executeStmt(query, callApplyBackRef);
callApplyBackRef.close(); callApplyBackRef.close();
...@@ -210,7 +211,6 @@ public class Backreference implements EntityFilterInterface, QueryInterface { ...@@ -210,7 +211,6 @@ public class Backreference implements EntityFilterInterface, QueryInterface {
this.statistics.put( this.statistics.put(
"subPropertySourceSetCount", Utils.countTable(query.getConnection(), this.sourceSet)); "subPropertySourceSetCount", Utils.countTable(query.getConnection(), this.sourceSet));
this.targetSet = null; this.targetSet = null;
getSubProperty().getFilter().apply(this);
final long t3 = System.currentTimeMillis(); final long t3 = System.currentTimeMillis();
try (final PreparedStatement callFinishSubProperty = try (final PreparedStatement callFinishSubProperty =
...@@ -324,6 +324,6 @@ public class Backreference implements EntityFilterInterface, QueryInterface { ...@@ -324,6 +324,6 @@ public class Backreference implements EntityFilterInterface, QueryInterface {
@Override @Override
public boolean isVersioned() { public boolean isVersioned() {
return false; return this.query.isVersioned();
} }
} }
...@@ -165,7 +165,11 @@ public class SubProperty implements QueryInterface, EntityFilterInterface { ...@@ -165,7 +165,11 @@ public class SubProperty implements QueryInterface, EntityFilterInterface {
@Override @Override
public boolean isVersioned() { public boolean isVersioned() {
// TODO Auto-generated method stub boolean is_versioned = this.query.isVersioned();
return false; if (is_versioned) {
throw new QueryException(
"Versioned queries are not supported for subqueries yet. Please file a feature request.");
}
return is_versioned;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment