Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-15409

Allow running LIKE queries on XWQL relational stored list member values

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 10.5
    • Query
    • None
    • Unknown

    Description

      The following query seems to produce one line for each value of the "item.parameters" relationally stored list property:

      {{velocity}}
      #set ($results = $services.query.xwql("SELECT doc.fullName, object.someListProperty FROM Document as doc, doc.object(Some.Class) AS object").execute())
      |=|=
      #foreach ($result in $results)
        #foreach ($subResult in $result)|$subResult#end
      
      #end
      {{/velocity}}
      

      Also, we are able to query for exact matches on list item values:

      ...WHERE 'somevalue' MEMBER OF object.someListProperty...
      

      However, we are not able to perform `LIKE` (pattern) matches on list item values. None of the following work:

      • SELECT doc.fullName, object.someListProperty FROM Document as doc, doc.object(Some.Class) AS object WHERE object.someListProperty LIKE 'abc%'
      • SELECT doc.fullName, listItem FROM Document as doc, doc.object(Some.Class) AS object, object.someListProperty as listItem WHERE listItem LIKE 'abc%'

      Attachments

        Activity

          People

            Unassigned Unassigned
            enygma Eduard Moraru
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: