Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1366

Failure parsing JCR-SQL2 queries that use square brackets to surround paths with SNS indexes

    XMLWordPrintable

Details

    Description

      In JCR-SQL2, the standard way to quote an identifier (e.g., selector name, literal name, or literal path) is to use square brackets. (See section 6.7.23 in the JCR 2.0 specification.) However, when a path contains a same-name-sibling index, then the path literal also contains square brackets, and our parser gets confused. So this works:

      SELECT * FROM [car:Car] WHERE ISDESCENDANTNODE([car:Car],[/foo/bar])
      

      while this does not work (but should):

      SELECT * FROM [car:Car] WHERE ISDESCENDANTNODE([car:Car],[/foo/bar[2]])
      

      Note the confusing use of square brackets.

      Attachments

        Activity

          People

            rhauch Randall Hauch (Inactive)
            rhauch Randall Hauch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: