lib/cli/query-word: stringify

This commit is contained in:
2025-05-16 18:47:26 +02:00
parent 369fcdbd4b
commit 45c4c5f09a
2 changed files with 21 additions and 4 deletions

View File

@@ -1,5 +1,3 @@
import 'dart:convert';
import 'dart:io';
import 'package:jadb/_data_ingestion/open_local_db.dart';
@@ -38,8 +36,10 @@ class QueryWord extends Command {
} else if (result.isEmpty) {
print("No matches");
} else {
print(JsonEncoder.withIndent(' ')
.convert(result.map((e) => e.toJson()).toList()));
for (final e in result) {
print(e.toString());
print("");
}
}
print("Query took ${time.elapsedMilliseconds}ms");