lib/search/word_search: add word count search
This commit is contained in:
@@ -27,10 +27,16 @@ class QueryWord extends Command {
|
||||
libsqlitePath: argResults!.option('libsqlite')!,
|
||||
);
|
||||
|
||||
final String searchWord = 'かな';
|
||||
|
||||
final time = Stopwatch()..start();
|
||||
final result = await JaDBConnection(db).searchWord('かな');
|
||||
final count = await JaDBConnection(db).searchWordCount(searchWord);
|
||||
time.stop();
|
||||
|
||||
final time2 = Stopwatch()..start();
|
||||
final result = await JaDBConnection(db).searchWord(searchWord);
|
||||
time2.stop();
|
||||
|
||||
if (result == null) {
|
||||
print("Invalid search");
|
||||
} else if (result.isEmpty) {
|
||||
@@ -42,6 +48,8 @@ class QueryWord extends Command {
|
||||
}
|
||||
}
|
||||
|
||||
print("Query took ${time.elapsedMilliseconds}ms");
|
||||
print("Total count: ${count}");
|
||||
print("Count query took ${time.elapsedMilliseconds}ms");
|
||||
print("Query took ${time2.elapsedMilliseconds}ms");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user