|
28 | 28 | import com.vaticle.typedb.client.api.answer.Numeric; |
29 | 29 | import com.vaticle.typedb.client.api.answer.NumericGroup; |
30 | 30 | import com.vaticle.typedb.client.api.database.Database; |
31 | | -import com.vaticle.typedb.client.api.user.User; |
32 | 31 | import com.vaticle.typedb.client.api.query.QueryFuture; |
| 32 | +import com.vaticle.typedb.client.api.user.User; |
33 | 33 | import com.vaticle.typedb.client.common.exception.TypeDBClientException; |
34 | 34 | import com.vaticle.typedb.common.collection.Either; |
35 | 35 | import com.vaticle.typedb.common.util.Java; |
|
40 | 40 | import com.vaticle.typeql.lang.TypeQL; |
41 | 41 | import com.vaticle.typeql.lang.common.TypeQLArg; |
42 | 42 | import com.vaticle.typeql.lang.common.exception.TypeQLException; |
43 | | -import com.vaticle.typeql.lang.query.TypeQLCompute; |
44 | 43 | import com.vaticle.typeql.lang.query.TypeQLDefine; |
45 | 44 | import com.vaticle.typeql.lang.query.TypeQLDelete; |
46 | 45 | import com.vaticle.typeql.lang.query.TypeQLInsert; |
|
85 | 84 | import java.util.function.Consumer; |
86 | 85 | import java.util.stream.Stream; |
87 | 86 |
|
88 | | -import static org.jline.builtins.Completers.TreeCompleter.node; |
89 | 87 | import static com.vaticle.typedb.common.collection.Collections.set; |
90 | 88 | import static com.vaticle.typedb.console.common.exception.ErrorMessage.Console.INCOMPATIBLE_JAVA_RUNTIME; |
91 | 89 | import static java.util.stream.Collectors.toList; |
| 90 | +import static org.jline.builtins.Completers.TreeCompleter.node; |
92 | 91 |
|
93 | 92 | public class TypeDBConsole { |
94 | 93 |
|
@@ -649,8 +648,6 @@ private CompletableFuture<Void> runQuery(TypeDBTransaction tx, TypeQLQuery query |
649 | 648 | } else if (query instanceof TypeQLMatch.Group.Aggregate) { |
650 | 649 | Stream<NumericGroup> result = tx.query().match(query.asMatchGroupAggregate()); |
651 | 650 | return CompletableFuture.runAsync(result::findFirst); |
652 | | - } else if (query instanceof TypeQLCompute) { |
653 | | - throw new TypeDBConsoleException("Compute query is not yet supported"); |
654 | 651 | } else { |
655 | 652 | throw new TypeDBConsoleException("Query is of unrecognized type: " + query); |
656 | 653 | } |
@@ -703,8 +700,6 @@ private void runQueryPrintAnswers(TypeDBTransaction tx, TypeQLQuery query) { |
703 | 700 | } else if (query instanceof TypeQLMatch.Group.Aggregate) { |
704 | 701 | Stream<NumericGroup> result = tx.query().match(query.asMatchGroupAggregate()); |
705 | 702 | printCancellableResult(result, x -> printer.numericGroup(x, tx)); |
706 | | - } else if (query instanceof TypeQLCompute) { |
707 | | - throw new TypeDBConsoleException("Compute query is not yet supported"); |
708 | 703 | } else { |
709 | 704 | throw new TypeDBConsoleException("Query is of unrecognized type: " + query); |
710 | 705 | } |
|
0 commit comments