SQLiteQueryBuilder.BuildQueryString Method

Definition

Build an SQL query string from the given clauses.

[Android.Runtime.Register("buildQueryString", "(ZLjava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "")]
public static string? BuildQueryString (bool distinct, string? tables, string[]? columns, string? where, string? groupBy, string? having, string? orderBy, string? limit);
[<Android.Runtime.Register("buildQueryString", "(ZLjava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "")>]
static member BuildQueryString : bool * string * string[] * string * string * string * string * string -> string

Parameters

distinct
Boolean

true if you want each row to be unique, false otherwise.

tables
String

The table names to compile the query against.

columns
String[]

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.

where
String

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 URL.

groupBy
String

A filter declaring how to group rows, formatted as an SQL GROUP BY clause (excluding the GROUP BY itself). Passing null will cause the rows to not be grouped.

having
String

A filter declare which row groups to include in the cursor, if row grouping is being used, formatted as an SQL HAVING clause (excluding the HAVING itself). Passing null will cause all row groups to be included, and is required when row grouping is not being used.

orderBy
String

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.

limit
String

Limits the number of rows returned by the query, formatted as LIMIT clause. Passing null denotes no LIMIT clause.

Returns

the SQL query string

Attributes

Remarks

Build an SQL query string from the given clauses.

Java documentation for android.database.sqlite.SQLiteQueryBuilder.buildQueryString(boolean, java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, 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