почему этот код не сортируется по DESC?В SQL Browser такой же запрос работает, но на андроиде нет.Мне нужен список DESC по записям, но этот код не работает
val dbHelper = DataBaseHelper(applicationContext)
val db = dbHelper.writableDatabase
recyclerView.layoutManager=LinearLayoutManager(this)
recyclerView.adapter = mojAdapter()
val contentResolver = contentResolver
val cursor = db.query(TableInfo.TABLE_NAME, arrayOf("records") ,null, null, null, null, "recordsDESC")
try {
cursor.moveToFirst()
while (!cursor.isAfterLast){
var name = cursor.getString(cursor.getColumnIndexOrThrow("records"))
listakontaktow.add(name)
cursor.moveToNext()
}
}
finally {
cursor.close()
}