SupportSQLiteQueryBuilder
class SupportSQLiteQueryBuilder
kotlin.Any | |
↳ | androidx.sqlite.db.SupportSQLiteQueryBuilder |
A simple query builder to create SQL SELECT queries.
Summary
Public methods | |
---|---|
static SupportSQLiteQueryBuilder! |
Creates a query for the given table name. |
SupportSQLiteQueryBuilder! |
Sets the given list of columns as the columns that will be returned. |
SupportSQLiteQuery! |
create() Creates the |
SupportSQLiteQueryBuilder! |
distinct() Adds DISTINCT keyword to the query. |
SupportSQLiteQueryBuilder! |
Adds a GROUP BY statement. |
SupportSQLiteQueryBuilder! |
Adds a HAVING statement. |
SupportSQLiteQueryBuilder! |
Adds a LIMIT statement. |
SupportSQLiteQueryBuilder! |
Adds an ORDER BY statement. |
SupportSQLiteQueryBuilder! |
Sets the arguments for the WHERE clause. |
Public methods
builder
static fun builder(tableName: String!): SupportSQLiteQueryBuilder!
Creates a query for the given table name.
Parameters | |
---|---|
tableName |
String!: The table name(s) to query. |
Return | |
---|---|
SupportSQLiteQueryBuilder! |
A builder to create a query. |
columns
fun columns(columns: Array<String!>!): SupportSQLiteQueryBuilder!
Sets the given list of columns as the columns that will be returned.
Parameters | |
---|---|
columns |
Array<String!>!: The list of column names that should be returned. |
Return | |
---|---|
SupportSQLiteQueryBuilder! |
this |
create
fun create(): SupportSQLiteQuery!
Creates the SupportSQLiteQuery
that can be passed into SupportSQLiteDatabase#query(SupportSQLiteQuery)
.
Return | |
---|---|
SupportSQLiteQuery! |
a new query |
distinct
fun distinct(): SupportSQLiteQueryBuilder!
Adds DISTINCT keyword to the query.
Return | |
---|---|
SupportSQLiteQueryBuilder! |
this |
groupBy
fun groupBy(groupBy: String!): SupportSQLiteQueryBuilder!
Adds a GROUP BY statement.
Parameters | |
---|---|
groupBy |
String!: The value of the GROUP BY statement. |
Return | |
---|---|
SupportSQLiteQueryBuilder! |
this |
having
fun having(having: String!): SupportSQLiteQueryBuilder!
Adds a HAVING statement. You must also provide groupBy(String)
for this to work.
Parameters | |
---|---|
having |
String!: The having clause. |
Return | |
---|---|
SupportSQLiteQueryBuilder! |
this |
limit
fun limit(limit: String!): SupportSQLiteQueryBuilder!
Adds a LIMIT statement.
Parameters | |
---|---|
limit |
String!: The limit value. |
Return | |
---|---|
SupportSQLiteQueryBuilder! |
this |
orderBy
fun orderBy(orderBy: String!): SupportSQLiteQueryBuilder!
Adds an ORDER BY statement.
Parameters | |
---|---|
orderBy |
String!: The order clause. |
Return | |
---|---|
SupportSQLiteQueryBuilder! |
this |
selection
fun selection(
selection: String!,
bindArgs: Array<Any!>!
): SupportSQLiteQueryBuilder!
Sets the arguments for the WHERE clause.
Parameters | |
---|---|
selection |
String!: The list of selection columns |
bindArgs |
Array<Any!>!: The list of bind arguments to match against these columns |
Return | |
---|---|
SupportSQLiteQueryBuilder! |
this |