@@ -155,7 +155,7 @@ class DatabaseEntitiesRepository(context: Context, dbPath: String) : EntitiesRep
155
155
return emptyList()
156
156
}
157
157
158
- return queryWithAttachedRowId (list).foldAndClose {
158
+ return queryEqualWithAttachedRowId (list).foldAndClose {
159
159
mapCursorRowToEntity(
160
160
it,
161
161
it.getInt(ROW_ID )
@@ -213,7 +213,7 @@ class DatabaseEntitiesRepository(context: Context, dbPath: String) : EntitiesRep
213
213
return null
214
214
}
215
215
216
- return queryWithAttachedRowId (
216
+ return queryEqualWithAttachedRowId (
217
217
list,
218
218
selectionColumn = EntitiesTable .COLUMN_ID ,
219
219
selectionArg = id
@@ -241,7 +241,7 @@ class DatabaseEntitiesRepository(context: Context, dbPath: String) : EntitiesRep
241
241
return null
242
242
}
243
243
244
- return queryWithAttachedRowId (
244
+ return queryEqualWithAttachedRowId (
245
245
list,
246
246
selectionColumn = EntitiesTable .COLUMN_LABEL ,
247
247
selectionArg = label
@@ -264,15 +264,15 @@ class DatabaseEntitiesRepository(context: Context, dbPath: String) : EntitiesRep
264
264
}
265
265
266
266
return if (propertyExists) {
267
- queryWithAttachedRowId (
267
+ queryEqualWithAttachedRowId (
268
268
list,
269
269
selectionColumn = EntitiesTable .getPropertyColumn(property),
270
270
selectionArg = value
271
271
).foldAndClose {
272
272
mapCursorRowToEntity(it, it.getInt(ROW_ID ))
273
273
}
274
274
} else if (value == " " ) {
275
- queryWithAttachedRowId (list).foldAndClose {
275
+ queryEqualWithAttachedRowId (list).foldAndClose {
276
276
mapCursorRowToEntity(it, it.getInt(ROW_ID ))
277
277
}
278
278
} else {
@@ -300,7 +300,7 @@ class DatabaseEntitiesRepository(context: Context, dbPath: String) : EntitiesRep
300
300
}
301
301
}
302
302
303
- private fun queryWithAttachedRowId (list : String ): Cursor {
303
+ private fun queryEqualWithAttachedRowId (list : String ): Cursor {
304
304
return databaseConnection.withConnection {
305
305
readableDatabase
306
306
.rawQuery(
@@ -315,7 +315,7 @@ class DatabaseEntitiesRepository(context: Context, dbPath: String) : EntitiesRep
315
315
}
316
316
}
317
317
318
- private fun queryWithAttachedRowId (
318
+ private fun queryEqualWithAttachedRowId (
319
319
list : String ,
320
320
selectionColumn : String ,
321
321
selectionArg : String? ,
0 commit comments