lib/cli/query-word: stringify
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user