XWiki Query Language

Last modified by Vincent Massol on 2024/11/19 16:12

 XWiki
 Feature
 Completed
 

Description

The objective of the XWiki Query Language is to provide a way to write query that is easy for XWiki developers and independent from the underlying storage system.

The API should be as much as possible similar to SQL and use the object and class nomenclature we use in XWiki.

API Specification

Open Discussion about the query language specification

Current situation

  • Main syntax and translator to HQL are implemented in 1.6M2.
  • XWQL is JPQL superset with extensions for XWiki objects. (doc.object(XWiki.Class) in from and where clauses)
  • Any current JPQL query is a correct XWQL query.
    • This means almost any HQL (HQL is JPQL superset) will work right with XWQL on hibernate store.
  • Accessible in 1.6 via query manager with programming rights: 
$xwiki.xWiki.store.queryManager.create(xwqlstatement, "xwql").execute()
  • Accessible in 1.7 via query manager without programming rights: 
$xwiki.queryManager.xwql(xwqlstatement).execute()

    • except full form statements which still require programming rights

query examples are in XWiki Query Language Specification

Plans

  • Fully replace current $xwiki.search* methods with new language in 1.8

 


Get Connected