...
Constraints are rendered using PMSFormula. Each WhereCondition class contains a PMSFormula object which manages the SQL rendering. Constraints are parsed and resolved before SQL generation, to determine which business tables are referenced. This is an important step so that the Join algorithm contains the correct set of tables.
Extending MQL
Specifying your own MQLQuery class
The default MQLQuery behavior may be extended or replaced. To accomplish this:
Step 1 | Extend MQLQueryImpl or implement the MQLQuery interface |
Step 2 | Make sure to have a constructor with the following signature: |
Step 3 | Either pass in the fully qualified class name into MQLQueryFactory.getMQLQuery(), |
Extending MQLQueryImpl
To easily add modifications or additional information to the MQL XML syntax, one must extend MQLQueryImpl, SQLGenerator and PMSFormula. The MQL Query Model can be extended by overriding specific methods within these classes. In the org.pentaho.pms.example package, an AdvancedMQLQuery class is available that demonstrates the extension of Selections XML parsing.