use of com.vaticle.typeql.lang.query.TypeQLUpdate in project grakn by graknlabs.
the class TypeQLSteps method typeql_update.
@Given("typeql update")
public void typeql_update(String updateQueryStatements) {
TypeQLUpdate typeQLQuery = TypeQL.parseQuery(String.join("\n", updateQueryStatements)).asUpdate();
tx().query().update(typeQLQuery);
}
use of com.vaticle.typeql.lang.query.TypeQLUpdate in project grakn by graknlabs.
the class QueryService method update.
private void update(String queryStr, Options.Query options, UUID reqID) {
TypeQLUpdate query = TypeQL.parseQuery(queryStr).asUpdate();
Context.Query context = new Context.Query(transactionSvc.context(), options.query(query), query);
FunctionalIterator<ConceptMap> answers = queryMgr.update(query, context);
transactionSvc.stream(answers, reqID, context.options(), a -> updateResPart(reqID, a));
}
Aggregations