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
The URI to query. This will be the full URI sent by the client; if the client is requesting a specific record, the URI will end in a record number that the implementation should parse and add to a WHERE or HAVING clause, specifying that _id value.
- projection
- String[]
The list of columns to put into the cursor. If
null all columns are included.
- selection
- String
A selection criteria to apply when filtering rows.
If null then all rows are included.
- selectionArgs
- String[]
You may include ?s in selection, which will be replaced by the values from selectionArgs, in order that they appear in the selection. The values will be bound as Strings.
- sortOrder
- String
How the rows in the cursor should be sorted.
If null then the provider is free to define the sort order.
Returns
a Cursor or null.
- 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)>