Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-2456

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

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 3.0
    • 3.0
    • API
    • Security Level: Public
    • None
    • 1

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          If we decide to make the change, we could target this in beta3.

          pasin Pasin Suriyentrakorn added a comment - If we decide to make the change, we could target this in beta3.

          Blake Meike 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. 

          pasin Pasin Suriyentrakorn added a comment - Blake Meike  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. 

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

          build-team Couchbase Build Team added a comment - Build couchbase-lite-android-3.0.0-181 contains couchbase-lite-java-common commit 48f17d0 with commit message: CBL-2456 : Database.createQuery should throw on bad n1ql query (#42)

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

          build-team Couchbase Build Team added a comment - Build couchbase-lite-android-3.0.0-181 contains couchbase-lite-java-ee-root commit 73b3833 with commit message: CBL-2456 : Database.createQuery should throw on bad n1ql query

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

          build-team Couchbase Build Team added a comment - Build couchbase-lite-java-3.0.0-182 contains couchbase-lite-java-common commit 48f17d0 with commit message: CBL-2456 : Database.createQuery should throw on bad n1ql query (#42)

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

          build-team Couchbase Build Team added a comment - Build couchbase-lite-java-3.0.0-182 contains couchbase-lite-java-ee-root commit 73b3833 with commit message: CBL-2456 : Database.createQuery should throw on bad n1ql query

          People

            The Lite The Lite
            pasin Pasin Suriyentrakorn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty