SupportSQLiteQueryBuilder
-
android
class SupportSQLiteQueryBuilder
A simple query builder to create SQL SELECT queries.
Summary
Public companion functions |
||
|---|---|---|
SupportSQLiteQueryBuilder |
Creates a query for the given table name. |
android
|
Public functions |
||
|---|---|---|
SupportSQLiteQueryBuilder |
Sets the given list of columns as the columns that will be returned. |
android
|
SupportSQLiteQuery |
create()Creates the |
android
|
SupportSQLiteQueryBuilder |
distinct()Adds DISTINCT keyword to the query. |
android
|
SupportSQLiteQueryBuilder |
Adds a GROUP BY statement. |
android
|
SupportSQLiteQueryBuilder |
Adds a HAVING statement. |
android
|
SupportSQLiteQueryBuilder |
Adds a LIMIT statement. |
android
|
SupportSQLiteQueryBuilder |
Adds an ORDER BY statement. |
android
|
SupportSQLiteQueryBuilder |
Sets the arguments for the WHERE clause. |
android
|
Public companion functions
builder
fun builder(tableName: String): SupportSQLiteQueryBuilder
Creates a query for the given table name.
| Parameters | |
|---|---|
tableName: String |
The table name(s) to query. |
| Returns | |
|---|---|
SupportSQLiteQueryBuilder |
A builder to create a query. |
Public functions
columns
fun columns(columns: Array<String>?): SupportSQLiteQueryBuilder
Sets the given list of columns as the columns that will be returned.
| Returns | |
|---|---|
SupportSQLiteQueryBuilder |
this |
create
fun create(): SupportSQLiteQuery
Creates the SupportSQLiteQuery that can be passed into SupportSQLiteDatabase.query.
| Returns | |
|---|---|
SupportSQLiteQuery |
a new query |
distinct
fun distinct(): SupportSQLiteQueryBuilder
Adds DISTINCT keyword to the query.
| Returns | |
|---|---|
SupportSQLiteQueryBuilder |
this |
groupBy
fun groupBy(groupBy: String?): SupportSQLiteQueryBuilder
Adds a GROUP BY statement.
| Parameters | |
|---|---|
groupBy: String? |
The value of the GROUP BY statement. |
| Returns | |
|---|---|
SupportSQLiteQueryBuilder |
this |
having
fun having(having: String?): SupportSQLiteQueryBuilder
Adds a HAVING statement. You must also provide groupBy for this to work.
| Parameters | |
|---|---|
having: String? |
The having clause. |
| Returns | |
|---|---|
SupportSQLiteQueryBuilder |
this |
limit
fun limit(limit: String): SupportSQLiteQueryBuilder
Adds a LIMIT statement.
| Parameters | |
|---|---|
limit: String |
The limit value. |
| Returns | |
|---|---|
SupportSQLiteQueryBuilder |
this |
orderBy
fun orderBy(orderBy: String?): SupportSQLiteQueryBuilder
Adds an ORDER BY statement.
| Parameters | |
|---|---|
orderBy: String? |
The order clause. |
| Returns | |
|---|---|
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 |
| Returns | |
|---|---|
SupportSQLiteQueryBuilder |
this |