diff --git a/lib/search.dart b/lib/search.dart index 59afde0..e2800f3 100644 --- a/lib/search.dart +++ b/lib/search.dart @@ -17,12 +17,26 @@ class JaDBConnection { searchKanjiWithDbConnection(this._connection, kanji); /// Search for a word in the database. - Future?> searchWord(String word) => - searchWordWithDbConnection(this._connection, word); + Future?> searchWord( + String word, { + SearchMode searchMode = SearchMode.Auto, + int page = 0, + int pageSize = 10, + }) => + searchWordWithDbConnection( + this._connection, + word, + searchMode, + page, + pageSize, + ); /// Search for a word in the database, and return the count of results. - Future searchWordCount(String word) => - searchWordCountWithDbConnection(this._connection, word); + Future searchWordCount( + String word, { + SearchMode searchMode = SearchMode.Auto, + }) => + searchWordCountWithDbConnection(this._connection, word, searchMode); /// Given a list of radicals, search which kanji contains all /// of the radicals, find their other radicals, and return those. diff --git a/lib/search/word_search/word_search.dart b/lib/search/word_search/word_search.dart index 087b19f..df62775 100644 --- a/lib/search/word_search/word_search.dart +++ b/lib/search/word_search/word_search.dart @@ -23,11 +23,11 @@ enum SearchMode { Future?> searchWordWithDbConnection( DatabaseExecutor connection, - String word, { - SearchMode searchMode = SearchMode.Auto, - int page = 0, - int pageSize = 10, -}) async { + String word, + SearchMode searchMode, + int page, + int pageSize, +) async { if (word.isEmpty) { return null; } @@ -80,9 +80,9 @@ Future?> searchWordWithDbConnection( Future searchWordCountWithDbConnection( DatabaseExecutor connection, - String word, { - SearchMode searchMode = SearchMode.Auto, -}) async { + String word, + SearchMode searchMode, +) async { if (word.isEmpty) { return null; }