Condividi tramite


SQLiteDatabase.RawQuery Method

Definition

Overloads

RawQuery(String, String[])

Runs the provided SQL and returns a Cursor over the result set.

RawQuery(String, String[], CancellationSignal)

Runs the provided SQL and returns a Cursor over the result set.

RawQuery(String, String[])

Runs the provided SQL and returns a Cursor over the result set.

[Android.Runtime.Register("rawQuery", "(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;", "GetRawQuery_Ljava_lang_String_arrayLjava_lang_String_Handler")]
public virtual Android.Database.ICursor? RawQuery (string? sql, string[]? selectionArgs);
[<Android.Runtime.Register("rawQuery", "(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;", "GetRawQuery_Ljava_lang_String_arrayLjava_lang_String_Handler")>]
abstract member RawQuery : string * string[] -> Android.Database.ICursor
override this.RawQuery : string * string[] -> Android.Database.ICursor

Parameters

sql
String

the SQL query. The SQL string must not be ; terminated

selectionArgs
String[]

You may include ?s in where clause in the query, which will be replaced by the values from selectionArgs. The values will be bound as Strings.

Returns

A Cursor object, which is positioned before the first entry. Note that Cursors are not synchronized, see the documentation for more details.

Attributes

Remarks

Runs the provided SQL and returns a Cursor over the result set.

Java documentation for android.database.sqlite.SQLiteDatabase.rawQuery(java.lang.String, java.lang.String[]).

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

RawQuery(String, String[], CancellationSignal)

Runs the provided SQL and returns a Cursor over the result set.

[Android.Runtime.Register("rawQuery", "(Ljava/lang/String;[Ljava/lang/String;Landroid/os/CancellationSignal;)Landroid/database/Cursor;", "GetRawQuery_Ljava_lang_String_arrayLjava_lang_String_Landroid_os_CancellationSignal_Handler")]
public virtual Android.Database.ICursor? RawQuery (string? sql, string[]? selectionArgs, Android.OS.CancellationSignal? cancellationSignal);
[<Android.Runtime.Register("rawQuery", "(Ljava/lang/String;[Ljava/lang/String;Landroid/os/CancellationSignal;)Landroid/database/Cursor;", "GetRawQuery_Ljava_lang_String_arrayLjava_lang_String_Landroid_os_CancellationSignal_Handler")>]
abstract member RawQuery : string * string[] * Android.OS.CancellationSignal -> Android.Database.ICursor
override this.RawQuery : string * string[] * Android.OS.CancellationSignal -> Android.Database.ICursor

Parameters

sql
String

the SQL query. The SQL string must not be ; terminated

selectionArgs
String[]

You may include ?s in where clause in the query, which will be replaced by the values from selectionArgs. The values will be bound as Strings.

cancellationSignal
CancellationSignal

A signal to cancel the operation in progress, or null if none. If the operation is canceled, then OperationCanceledException will be thrown when the query is executed.

Returns

A Cursor object, which is positioned before the first entry. Note that Cursors are not synchronized, see the documentation for more details.

Attributes

Remarks

Runs the provided SQL and returns a Cursor over the result set.

Java documentation for android.database.sqlite.SQLiteDatabase.rawQuery(java.lang.String, java.lang.String[], android.os.CancellationSignal).

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