Skip to content

Commit

Permalink
Bring back the original method name
Browse files Browse the repository at this point in the history
  • Loading branch information
grzesiek2010 committed Jan 7, 2025
1 parent dec9d71 commit 4579e89
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class DatabaseEntitiesRepository(context: Context, dbPath: String) : EntitiesRep
return emptyList()
}

return queryEqualWithAttachedRowId(list).foldAndClose {
return queryWithAttachedRowId(list).foldAndClose {
mapCursorRowToEntity(
it,
it.getInt(ROW_ID)
Expand Down Expand Up @@ -234,7 +234,7 @@ class DatabaseEntitiesRepository(context: Context, dbPath: String) : EntitiesRep
return null
}

return queryEqualWithAttachedRowId(
return queryWithAttachedRowId(
list,
selectionColumn = EntitiesTable.COLUMN_ID,
selectionArg = id
Expand All @@ -257,15 +257,15 @@ class DatabaseEntitiesRepository(context: Context, dbPath: String) : EntitiesRep
}

return if (propertyExists) {
queryEqualWithAttachedRowId(
queryWithAttachedRowId(
list,
selectionColumn = EntitiesTable.getPropertyColumn(property),
selectionArg = value
).foldAndClose {
mapCursorRowToEntity(it, it.getInt(ROW_ID))
}
} else if (value == "") {
queryEqualWithAttachedRowId(list).foldAndClose {
queryWithAttachedRowId(list).foldAndClose {
mapCursorRowToEntity(it, it.getInt(ROW_ID))
}
} else {
Expand Down Expand Up @@ -293,7 +293,7 @@ class DatabaseEntitiesRepository(context: Context, dbPath: String) : EntitiesRep
}
}

private fun queryEqualWithAttachedRowId(list: String): Cursor {
private fun queryWithAttachedRowId(list: String): Cursor {
return databaseConnection.withConnection {
readableDatabase
.rawQuery(
Expand All @@ -308,7 +308,7 @@ class DatabaseEntitiesRepository(context: Context, dbPath: String) : EntitiesRep
}
}

private fun queryEqualWithAttachedRowId(
private fun queryWithAttachedRowId(
list: String,
selectionColumn: String,
selectionArg: String?
Expand Down

0 comments on commit 4579e89

Please sign in to comment.