public static class QueryOptimizer.AddTypeToRolePlayer extends QueryOptimizer.AbstractQueryOptimizer
Optimizes the role-player() predicate when the type of the role is known from a type() predicate in the same query. Typical usage is:
role-player($R1, fixed-point), association-role($A, $R1), association-role($A, $R2), $R1 /= $R2, role-player($R2, $OTHER), type($R1, required-type)?
What's really needed for the optimization to kick in is two things:
Constructor and Description |
---|
AddTypeToRolePlayer() |
Modifier and Type | Method and Description |
---|---|
void |
optimize(TologQuery query,
QueryContext context) |
optimize, optimize
public void optimize(TologQuery query, QueryContext context)
optimize
in interface QueryOptimizerIF
optimize
in class QueryOptimizer.AbstractQueryOptimizer