| Constructor and Description |
|---|
Query() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
copy(Query query) |
String |
explain()
Returns a string describing the implementation of the compiled query.
|
protected DataSource |
getFrom() |
protected OrderBy |
getOrderBy() |
protected Select |
getSelect() |
protected Expression |
getWhere() |
protected boolean |
isDistinct() |
ResultSet |
run()
Runs the query.
|
static Select |
select()
Create a SELECT ALL (*) query.
|
static Select |
selectDistinct()
Create a SELECT DISTINCT ALL (*) query.
|
protected void |
setDistinct(boolean distinct) |
protected void |
setFrom(DataSource from) |
protected void |
setOrderBy(OrderBy orderBy) |
protected void |
setSelect(Select select) |
protected void |
setWhere(Expression where) |
public static Select select()
public static Select selectDistinct()
public ResultSet run() throws CouchbaseLiteException
The results come from a snapshot of the database taken at the moment the run() method is called, so they will not reflect any changes made to the database afterwards.
CouchbaseLiteException - if there is an error when running the query.public String explain() throws CouchbaseLiteException
CouchbaseLiteException - if an error occursprotected Select getSelect()
protected void setSelect(Select select)
protected DataSource getFrom()
protected void setFrom(DataSource from)
protected Expression getWhere()
protected void setWhere(Expression where)
protected OrderBy getOrderBy()
protected void setOrderBy(OrderBy orderBy)
protected boolean isDistinct()
protected void setDistinct(boolean distinct)
protected void copy(Query query)