|
14 | 14 | import com.typedb.console.common.util.Java;
|
15 | 15 | import com.typedb.driver.TypeDB;
|
16 | 16 | import com.typedb.driver.api.Driver;
|
| 17 | +import com.typedb.driver.api.QueryType; |
17 | 18 | import com.typedb.driver.api.Transaction;
|
18 | 19 | import com.typedb.driver.api.answer.ConceptRow;
|
19 | 20 | import com.typedb.driver.api.answer.JSON;
|
@@ -713,20 +714,21 @@ private void runQuery(Transaction tx, String queryString) {
|
713 | 714 |
|
714 | 715 | private void runQueryPrintAnswers(Transaction tx, String queryString) {
|
715 | 716 | QueryAnswer answer = tx.query(queryString).resolve();
|
| 717 | + QueryType queryType = answer.getQueryType(); |
716 | 718 | if (answer.isOk()) {
|
717 | 719 | printer.info(QUERY_SUCCESS);
|
718 | 720 | } else if (answer.isConceptRows()) {
|
719 | 721 | Stream<ConceptRow> resultRows = answer.asConceptRows().stream();
|
720 | 722 | AtomicBoolean first = new AtomicBoolean(true);
|
721 | 723 | printCancellableResult(resultRows, row -> {
|
722 |
| - printer.conceptRow(row, tx, first.get()); |
| 724 | + printer.conceptRow(row, queryType, tx, first.get()); |
723 | 725 | first.set(false);
|
724 | 726 | });
|
725 | 727 | } else if (answer.isConceptDocuments()) {
|
726 | 728 | Stream<JSON> resultDocuments = answer.asConceptDocuments().stream();
|
727 | 729 | AtomicBoolean first = new AtomicBoolean(true);
|
728 | 730 | printCancellableResult(resultDocuments, document -> {
|
729 |
| - printer.conceptDocument(document, first.get()); |
| 731 | + printer.conceptDocument(document, queryType, first.get()); |
730 | 732 | first.set(false);
|
731 | 733 | });
|
732 | 734 | } else {
|
|
0 commit comments