Compartilhar via


SQLiteDatabase.ValidateSql(String, CancellationSignal) Method

Definition

Verifies that a SQL SELECT statement is valid by compiling it.

[Android.Runtime.Register("validateSql", "(Ljava/lang/String;Landroid/os/CancellationSignal;)V", "GetValidateSql_Ljava_lang_String_Landroid_os_CancellationSignal_Handler", ApiSince=24)]
public virtual void ValidateSql (string sql, Android.OS.CancellationSignal? cancellationSignal);
[<Android.Runtime.Register("validateSql", "(Ljava/lang/String;Landroid/os/CancellationSignal;)V", "GetValidateSql_Ljava_lang_String_Landroid_os_CancellationSignal_Handler", ApiSince=24)>]
abstract member ValidateSql : string * Android.OS.CancellationSignal -> unit
override this.ValidateSql : string * Android.OS.CancellationSignal -> unit

Parameters

sql
String

SQL to be validated

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.

Attributes

Remarks

Verifies that a SQL SELECT statement is valid by compiling it. If the SQL statement is not valid, this method will throw a SQLiteException.

Java documentation for android.database.sqlite.SQLiteDatabase.validateSql(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