diff --git a/lib/search.dart b/lib/search.dart index aa8c2ae..59afde0 100644 --- a/lib/search.dart +++ b/lib/search.dart @@ -12,18 +12,27 @@ class JaDBConnection { const JaDBConnection(this._connection); + /// Search for a kanji in the database. Future searchKanji(String kanji) => searchKanjiWithDbConnection(this._connection, kanji); + /// Search for a word in the database. Future?> searchWord(String word) => searchWordWithDbConnection(this._connection, word); + /// Search for a word in the database, and return the count of results. Future searchWordCount(String word) => searchWordCountWithDbConnection(this._connection, word); + /// Given a list of radicals, search which kanji contains all + /// of the radicals, find their other radicals, and return those. + /// This is used to figure out which remaining combinations of radicals + /// the user can search for without getting zero results. Future> searchRemainingRadicals(List radicals) => searchRemainingRadicalsWithDbConnection(this._connection, radicals); + /// Given a list of radicals, search which kanji contains all + /// of the radicals, and return those. Future> searchKanjiByRadicals(List radicals) => searchKanjiByRadicalsWithDbConnection(this._connection, radicals); } diff --git a/lib/search/radical_search.dart b/lib/search/radical_search.dart index 3a28a4a..25bd7b5 100644 --- a/lib/search/radical_search.dart +++ b/lib/search/radical_search.dart @@ -2,10 +2,6 @@ import 'package:sqflite_common/sqlite_api.dart'; // TODO: validate that the list of radicals all are valid radicals -/// Given a list of radicals, search which kanji contains all -/// of the radicals, find their other radicals, and return those. -/// This is used to figure out which remaining combinations of radicals -/// the user can search for without getting zero results. Future> searchRemainingRadicalsWithDbConnection( DatabaseExecutor connection, List radicals, @@ -34,8 +30,6 @@ Future> searchRemainingRadicalsWithDbConnection( return remainingRadicals; } -/// Given a list of radicals, search which kanji contains all -/// of the radicals, and return those. Future> searchKanjiByRadicalsWithDbConnection( DatabaseExecutor connection, List radicals,