public final class Query
extends java.lang.Object
StorIOSQLite.
Instances of this class are immutable.
| Modifier and Type | Class and Description |
|---|---|
static class |
Query.Builder
Builder for
Query. |
static class |
Query.CompleteBuilder
Compile-time safe part of builder for
DeleteQuery. |
| Modifier and Type | Method and Description |
|---|---|
static Query.Builder |
builder()
Creates new builder for
Query. |
java.util.List<java.lang.String> |
columns()
Gets optional immutable list of columns that should be received.
|
boolean |
distinct()
Gets distinct option.
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
groupBy()
Gets
GROUP BY clause. |
int |
hashCode() |
java.lang.String |
having()
Gets having clause.
|
java.lang.String |
limit()
Gets
LIMIT clause. |
java.util.Set<java.lang.String> |
observesTags()
Gets optional immutable set of tags that should be observed by this query.
|
java.lang.String |
orderBy()
Gets
ORDER BY clause. |
java.lang.String |
table()
Gets table name.
|
Query.CompleteBuilder |
toBuilder()
Returns the new builder that has the same content as this query.
|
java.lang.String |
toString() |
java.lang.String |
where()
Gets
WHERE clause. |
java.util.List<java.lang.String> |
whereArgs()
Gets optional immutable list of arguments for
where() clause. |
public boolean distinct()
True if you want each row to be unique, false otherwise.
@NonNull public java.lang.String table()
@NonNull public java.util.List<java.lang.String> columns()
If list is empty — all columns will be received.
@NonNull public java.lang.String where()
WHERE clause.
Optional filter declaring which rows to return.
Formatted as an SQL WHERE clause (excluding the WHERE itself).
If empty — Query will retrieve all rows for the given table.
WHERE clause.@NonNull public java.util.List<java.lang.String> whereArgs()
where() clause.WHERE clause.@NonNull public java.lang.String groupBy()
GROUP BY clause.
Optional filter declaring how to group rows.
Formatted as an SQL GROUP BY clause (excluding the GROUP BY itself).
Passing null or empty string will cause the rows to not be grouped.
GROUP BY clause.@NonNull public java.lang.String having()
Optional 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 or empty string will cause all row groups to be included,
and is required when row grouping is not being used.
HAVING clause.@NonNull public java.lang.String orderBy()
ORDER BY clause.
Optional specifier to how to order the rows.
Formatted as an SQL ORDER BY clause (excluding the ORDER BY itself).
Passing null or empty string will use the default sort order, which may be unordered.
ORDER BY clause.@NonNull public java.lang.String limit()
LIMIT clause.
Optional specifier that limits the number of rows returned by the query.
Formatted as LIMIT clause.
Passing null or empty String denotes no LIMIT clause.
LIMIT clause.@NonNull public java.util.Set<java.lang.String> observesTags()
It will be used to observe changes of this tags and re-execute this query.
@NonNull public Query.CompleteBuilder toBuilder()
Query.CompleteBuilder with content of this query.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object@NonNull public static Query.Builder builder()
Query.Query.Builder.