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

Can't query the records has the % character with LIKE operator.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.7.0
    • LiteCore
    • Security Level: Public
    • None
    • CBL Sprint 1
    • 3

    Description

      https://github.com/couchbase/couchbase-lite-core/issues/807

      I have some records that has the % character, and i want to query these records so I used LIKE operator. But it seems it returns all records. I know we have to escape, but i couldn't found any document for escaping of couchbase-lite-core. I tried by preceding them with a backslash () but it doesn't work.

      We should add ESCAPE '\' to the LIKE expressions the query generator creates, so that developers can escape percents with backslashes.

      Attachments

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

        Activity

          Build couchbase-lite-android-2.7.0-65 contains couchbase-lite-core commit 6e0c8a3 with commit message:
          CBL-175 Escape backslash inside of LIKE expressions

          build-team Couchbase Build Team added a comment - Build couchbase-lite-android-2.7.0-65 contains couchbase-lite-core commit 6e0c8a3 with commit message: CBL-175 Escape backslash inside of LIKE expressions

          Build couchbase-lite-core-2.7.0-35 contains couchbase-lite-core commit 6e0c8a3 with commit message:
          CBL-175 Escape backslash inside of LIKE expressions

          build-team Couchbase Build Team added a comment - Build couchbase-lite-core-2.7.0-35 contains couchbase-lite-core commit 6e0c8a3 with commit message: CBL-175 Escape backslash inside of LIKE expressions

          Build couchbase-lite-log-2.6.0-159 contains couchbase-lite-core commit 6e0c8a3 with commit message:
          CBL-175 Escape backslash inside of LIKE expressions

          build-team Couchbase Build Team added a comment - Build couchbase-lite-log-2.6.0-159 contains couchbase-lite-core commit 6e0c8a3 with commit message: CBL-175 Escape backslash inside of LIKE expressions

          Build couchbase-lite-cblite-2.6.0-128 contains couchbase-lite-core commit 6e0c8a3 with commit message:
          CBL-175 Escape backslash inside of LIKE expressions

          build-team Couchbase Build Team added a comment - Build couchbase-lite-cblite-2.6.0-128 contains couchbase-lite-core commit 6e0c8a3 with commit message: CBL-175 Escape backslash inside of LIKE expressions

          Build couchbase-lite-net-2.7.0-25 contains couchbase-lite-core commit 6e0c8a3 with commit message:
          CBL-175 Escape backslash inside of LIKE expressions

          build-team Couchbase Build Team added a comment - Build couchbase-lite-net-2.7.0-25 contains couchbase-lite-core commit 6e0c8a3 with commit message: CBL-175 Escape backslash inside of LIKE expressions

          Build couchbase-lite-ios-2.7.0-28 contains couchbase-lite-core commit 6e0c8a3 with commit message:
          CBL-175 Escape backslash inside of LIKE expressions

          build-team Couchbase Build Team added a comment - Build couchbase-lite-ios-2.7.0-28 contains couchbase-lite-core commit 6e0c8a3 with commit message: CBL-175 Escape backslash inside of LIKE expressions

          Build couchbase-lite-log-2.7.0-79 contains couchbase-lite-core commit 6e0c8a3 with commit message:
          CBL-175 Escape backslash inside of LIKE expressions

          build-team Couchbase Build Team added a comment - Build couchbase-lite-log-2.7.0-79 contains couchbase-lite-core commit 6e0c8a3 with commit message: CBL-175 Escape backslash inside of LIKE expressions

          Build couchbase-lite-cblite-2.7.0-5 contains couchbase-lite-core commit 6e0c8a3 with commit message:
          CBL-175 Escape backslash inside of LIKE expressions

          build-team Couchbase Build Team added a comment - Build couchbase-lite-cblite-2.7.0-5 contains couchbase-lite-core commit 6e0c8a3 with commit message: CBL-175 Escape backslash inside of LIKE expressions

          People

            jimb Jim Borden
            jimb Jim Borden
            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