Update Database's createQuery() to return an error or throw CouchbaseLiteException (Beta 3)

Description

While looking at the API and Jay's in-progress PR related to LiveQuery, I started to think that we should have the method throw an exception or return an error right away if the N1QL string cannot be parsed. Currently we defer the returning error to the execute method BUT this means that if the user is using LiveQuery alone, there will be no error returned when N1QL string is wrong.

Activity

Show:

CB robot October 28, 2021 at 4:51 PM

Build couchbase-lite-java-3.0.0-182 contains couchbase-lite-java-ee-root commit 73b3833 with commit message:
: Database.createQuery should throw on bad n1ql query

CB robot October 28, 2021 at 4:51 PM

Build couchbase-lite-java-3.0.0-182 contains couchbase-lite-java-common commit 48f17d0 with commit message:
: Database.createQuery should throw on bad n1ql query (#42)

CB robot October 28, 2021 at 4:40 PM

Build couchbase-lite-android-3.0.0-181 contains couchbase-lite-java-ee-root commit 73b3833 with commit message:
: Database.createQuery should throw on bad n1ql query

CB robot October 28, 2021 at 4:40 PM

Build couchbase-lite-android-3.0.0-181 contains couchbase-lite-java-common commit 48f17d0 with commit message:
: Database.createQuery should throw on bad n1ql query (#42)

Pasin Suriyentrakorn October 12, 2021 at 7:10 PM

 reminded me that we have already reported the error for LiveQuery. So this ticket is basically to return the error early. As N1QL string is prone to error, I think returning an error early would be better. 

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Components

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created October 12, 2021 at 5:06 PM
Updated November 10, 2021 at 11:22 PM
Resolved October 19, 2021 at 8:59 PM
Instabug