mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-12-20 23:57:16 +00:00
upfixes
This commit is contained in:
parent
15e9254e00
commit
a1bf43def9
@ -143,12 +143,11 @@ class OneToManyAndroidRepo<Key, Value>(
|
|||||||
}.toLong()
|
}.toLong()
|
||||||
|
|
||||||
override suspend fun count(k: Key): Long = helper.blockingReadableTransaction {
|
override suspend fun count(k: Key): Long = helper.blockingReadableTransaction {
|
||||||
select(
|
selectDistinct(
|
||||||
tableName,
|
tableName,
|
||||||
columns = valueColumnArray,
|
columns = valueColumnArray,
|
||||||
selection = "$idColumnName=?",
|
selection = "$idColumnName=?",
|
||||||
selectionArgs = arrayOf(k.keyAsString()),
|
selectionArgs = arrayOf(k.keyAsString())
|
||||||
limit = FirstPagePagination(1).limitClause()
|
|
||||||
).use {
|
).use {
|
||||||
it.count
|
it.count
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user