Compare commits
1 Commits
mugiten-v0
...
mugiten-v0
| Author | SHA1 | Date | |
|---|---|---|---|
|
1868c6fb41
|
@@ -77,7 +77,7 @@ String _filterFTSSensitiveCharacters(String word) {
|
||||
${!countOnly ? 'LIMIT ?' : ''}
|
||||
)
|
||||
|
||||
${countOnly ? 'SELECT COUNT("entryId") AS count' : 'SELECT "entryId", MAX("score") AS "score"'}
|
||||
SELECT ${countOnly ? 'COUNT("entryId") AS count' : '"entryId", MAX("score") AS "score"'}
|
||||
FROM (
|
||||
SELECT * FROM fts_results
|
||||
UNION
|
||||
@@ -128,7 +128,7 @@ Future<int> _queryKanjiCount(
|
||||
);
|
||||
return connection
|
||||
.rawQuery(query, args)
|
||||
.then((result) => result.first['count'] as int);
|
||||
.then((result) => result.firstOrNull?['count'] as int? ?? 0);
|
||||
}
|
||||
|
||||
Future<List<ScoredEntryId>> _queryKana(
|
||||
@@ -161,7 +161,7 @@ Future<int> _queryKanaCount(
|
||||
);
|
||||
return connection
|
||||
.rawQuery(query, args)
|
||||
.then((result) => result.first['count'] as int);
|
||||
.then((result) => result.firstOrNull?['count'] as int? ?? 0);
|
||||
}
|
||||
|
||||
Future<List<ScoredEntryId>> _queryEnglish(
|
||||
|
||||
Reference in New Issue
Block a user