DocumentsProvider.Query Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| Query(Uri, String[], Bundle, CancellationSignal) |
Implementation is provided by the parent class. |
| Query(Uri, String[], String, String[], String) |
Implementation is provided by the parent class. |
Query(Uri, String[], Bundle, CancellationSignal)
Implementation is provided by the parent class.
[Android.Runtime.Register("query", "(Landroid/net/Uri;[Ljava/lang/String;Landroid/os/Bundle;Landroid/os/CancellationSignal;)Landroid/database/Cursor;", "", ApiSince=26)]
public override sealed Android.Database.ICursor? Query(Android.Net.Uri? uri, string[]? projection, Android.OS.Bundle? queryArgs, Android.OS.CancellationSignal? cancellationSignal);
[<Android.Runtime.Register("query", "(Landroid/net/Uri;[Ljava/lang/String;Landroid/os/Bundle;Landroid/os/CancellationSignal;)Landroid/database/Cursor;", "", ApiSince=26)>]
override this.Query : Android.Net.Uri * string[] * Android.OS.Bundle * Android.OS.CancellationSignal -> Android.Database.ICursor
Parameters
- uri
- Uri
The URI to query. This will be the full URI sent by the client. This value cannot be null.
- projection
- String[]
The list of columns to put into the cursor. If null provide a default set of columns.
- queryArgs
- Bundle
A Bundle containing additional information necessary for the operation. Arguments may include SQL style arguments, such as ContentResolver.QUERY_ARG_SQL_LIMIT, but note that the documentation for each individual provider will indicate which arguments they support. This value may be null.
- cancellationSignal
- CancellationSignal
A signal to cancel the operation in progress, or null.
Returns
a Cursor or null.
- Attributes
Remarks
Implementation is provided by the parent class. Cannot be overridden.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Query(Uri, String[], String, String[], String)
Implementation is provided by the parent class.
[Android.Runtime.Register("query", "(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;", "")]
public override sealed Android.Database.ICursor? Query(Android.Net.Uri? uri, string[]? projection, string? selection, string[]? selectionArgs, string? sortOrder);
[<Android.Runtime.Register("query", "(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;", "")>]
override this.Query : Android.Net.Uri * string[] * string * string[] * string -> Android.Database.ICursor
Parameters
- uri
- Uri
Before Android 8.0, the document-provider URI to query.
- projection
- String[]
Before Android 8.0, the columns passed to the matching document query method.
- selection
- String
Not used by this method.
- selectionArgs
- String[]
Not used by this method.
- sortOrder
- String
Before Android 8.0, the sort order passed to child-document queries. It is not used for other queries.
Returns
On Android 8.0 (API level 26) and later, this method does not return; it always throws UnsupportedOperationException. On earlier versions, it returns the cursor from the matching document query method, such as QueryChildDocuments(String, String[], String), or null if that method throws FileNotFoundException.
- Attributes
Remarks
Android reference for android.provider.DocumentsProvider.query.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
See also
- QueryRoots(String[])
- <xref:Android.Provider.DocumentsProvider.QueryRecentDocuments(System.String%2c+System.String%5b%5d)>
- <xref:Android.Provider.DocumentsProvider.QueryDocument(System.String%2c+System.String%5b%5d)>
- <xref:Android.Provider.DocumentsProvider.QueryChildDocuments(System.String%2c+System.String%5b%5d%2c+System.String%5b%5d)>
- <xref:Android.Provider.DocumentsProvider.QuerySearchDocuments(System.String%2c+System.String%2c+System.String)>