How do I do single search query?

0

I am trying to load data obtained from the database so I can use it for further processing(like charts and the use of buttons) but I came to realize that when running the code below, the program stays in query mode and does not quit, so how do I do single query or a read? I have looked around the forms but I have not found anything similar to my problem.

Amplify.DataStore.query(
            Holder::class.java,
            { items ->
                while (items.hasNext()) {
                    val item = items.next()
                    Log.i("Amplify", "Uploaded time: " + item.completedAt)
                    Log.i("Amplify", "Data Uploaded: " + item.data)
                    temp = item.data.toMutableList()
                    //Log.i("Debug1", "Held Data: $temp")

                }
            },
            { failure -> Log.e("Amplify", "Could not query DataStore", failure) }
        )
kpt
질문됨 2년 전78회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠