Cursor query (Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)
: Uri를 입력하여 쿼리를 수행하여 Cursor로 그 결과를 받는다.
uri

The URI, using the content:// scheme, for the content to retrieve.

URI 를 사용하여 content:// 데이터들을 검색할 수 있습니다.

 

projection

A list of which columns to return. Passing null will return all columns, which is discouraged to prevent reading data from storage that isn't going to be used.

SQL의 SELECT 문에 해당합니다. columns 을 리턴합니다. null을 사용하면 모든 columns 을 리턴합니다.

 

selection

A filter declaring which rows to return, formatted as an SQL WHERE clause (excluding the WHERE itself). Passing null will return all rows for the given URI.

SQL의 WHERE 조건에 해당합니다. null일 경우 모든 데이터를 반환합니다.

 

selectionArgs

You may include ?s in selection, which will be replaced by the values from selectionArgs, in the order that they appear in the selection. The values will be bound as Strings.

selection을 지정하였을 경우 where절에 해당하는 값들을 배열로 적어줘야 합니다.

 

sortOrder

How to order the rows, formatted as an SQL ORDER BY clause (excluding the ORDER BY itself). Passing null will use the default sort order, which may be unordered.

정렬 조건을 설정합니다. 사용방법은 SQL ORDER BY를 사용하는 것과 같습니다.





// 안드로이드 내부 쿼리 조회하는 파라미터 설명
Posted by 커널제로

본 블로그는 페이스북 댓글을 지원합니다.

,