Hi, I’m using couchbase lite 2.0 for android, and I would like to query the database with n1ql queries.
That is possible in query editor like below.
But, how should I do in android query builder?
At the moment I don’t see that possibility, below query is not working.
Query query = QueryBuilder
.select(
SelectResult.property(“WEEKDAY_STR(REG_DATE)”).as(“Day”),
SelectResult.expression(Function.sum(Expression.property(“TOTAL_AMOUNT”))).as(“TOT_AMOUNT”)
)
.from(DataSource.database(database))
.where(Expression.property(“type”).equalTo(Expression.string(“SALE”))
.groupBy(Expression.property(“WEEKDAY_STR(REG_DATE)”));