This commit is contained in:
InsanusMokrassar 2022-04-13 16:01:13 +06:00
parent 15e9254e00
commit a1bf43def9

View File

@ -143,12 +143,11 @@ class OneToManyAndroidRepo<Key, Value>(
}.toLong()
override suspend fun count(k: Key): Long = helper.blockingReadableTransaction {
select(
selectDistinct(
tableName,
columns = valueColumnArray,
selection = "$idColumnName=?",
selectionArgs = arrayOf(k.keyAsString()),
limit = FirstPagePagination(1).limitClause()
selectionArgs = arrayOf(k.keyAsString())
).use {
it.count
}