Skip to content

Commit f32b51a

Browse files
committed
Naming improvements
1 parent 00f15e9 commit f32b51a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

collect_app/src/main/java/org/odk/collect/android/database/entities/DatabaseEntitiesRepository.kt

+7-7
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class DatabaseEntitiesRepository(context: Context, dbPath: String) : EntitiesRep
155155
return emptyList()
156156
}
157157

158-
return queryWithAttachedRowId(list).foldAndClose {
158+
return queryEqualWithAttachedRowId(list).foldAndClose {
159159
mapCursorRowToEntity(
160160
it,
161161
it.getInt(ROW_ID)
@@ -213,7 +213,7 @@ class DatabaseEntitiesRepository(context: Context, dbPath: String) : EntitiesRep
213213
return null
214214
}
215215

216-
return queryWithAttachedRowId(
216+
return queryEqualWithAttachedRowId(
217217
list,
218218
selectionColumn = EntitiesTable.COLUMN_ID,
219219
selectionArg = id
@@ -241,7 +241,7 @@ class DatabaseEntitiesRepository(context: Context, dbPath: String) : EntitiesRep
241241
return null
242242
}
243243

244-
return queryWithAttachedRowId(
244+
return queryEqualWithAttachedRowId(
245245
list,
246246
selectionColumn = EntitiesTable.COLUMN_LABEL,
247247
selectionArg = label
@@ -264,15 +264,15 @@ class DatabaseEntitiesRepository(context: Context, dbPath: String) : EntitiesRep
264264
}
265265

266266
return if (propertyExists) {
267-
queryWithAttachedRowId(
267+
queryEqualWithAttachedRowId(
268268
list,
269269
selectionColumn = EntitiesTable.getPropertyColumn(property),
270270
selectionArg = value
271271
).foldAndClose {
272272
mapCursorRowToEntity(it, it.getInt(ROW_ID))
273273
}
274274
} else if (value == "") {
275-
queryWithAttachedRowId(list).foldAndClose {
275+
queryEqualWithAttachedRowId(list).foldAndClose {
276276
mapCursorRowToEntity(it, it.getInt(ROW_ID))
277277
}
278278
} else {
@@ -300,7 +300,7 @@ class DatabaseEntitiesRepository(context: Context, dbPath: String) : EntitiesRep
300300
}
301301
}
302302

303-
private fun queryWithAttachedRowId(list: String): Cursor {
303+
private fun queryEqualWithAttachedRowId(list: String): Cursor {
304304
return databaseConnection.withConnection {
305305
readableDatabase
306306
.rawQuery(
@@ -315,7 +315,7 @@ class DatabaseEntitiesRepository(context: Context, dbPath: String) : EntitiesRep
315315
}
316316
}
317317

318-
private fun queryWithAttachedRowId(
318+
private fun queryEqualWithAttachedRowId(
319319
list: String,
320320
selectionColumn: String,
321321
selectionArg: String?,

0 commit comments

Comments
 (0)