use of com.vaticle.typeql.lang.common.exception.TypeQLException in project grakn by graknlabs.
the class TypeQLSteps method typeql_match.
@When("get answers of typeql match")
public void typeql_match(String typeQLQueryStatements) {
try {
TypeQLMatch typeQLQuery = TypeQL.parseQuery(String.join("\n", typeQLQueryStatements)).asMatch();
clearAnswers();
answers = tx().query().match(typeQLQuery).toList();
} catch (TypeQLException e) {
// NOTE: We manually close transaction here, because we want to align with all non-java clients,
// where parsing happens at server-side which closes transaction if they fail
tx().close();
throw e;
}
}
Aggregations