Collapse AllExpand All

2. MetaSQL Editor

As we have seen, MetaSQL is a non-standard language embedded within standard SQL. MetaSQL cannot be executed directly on a database, but must first pass through and be interpreted by the MetaSQL parser. The MetaSQL parser then generates standard SQL which is sent to the target database for processing.

The MetaSQL Editor is a tool designed to facilitate the process of writing report definitions having MetaSQL elements. Using the MetaSQL Editor, report authors can develop complex queries, test them with different values for parameters, and then view the resulting standard SQL. Report authors can save time and effort using the MetaSQL Editor to test any portion of a complex query having MetaSQL elements.

Note

The MetaSQL Editor is a multi-platform tool, running identically on Windows, Linux, and Mac. For testing report definitions linked to the xTuple application, the MetaSQL binary file should be installed in the same directory as the xTuple client.

The example we will be using in this section focuses on running the MetaSQL Editor against an xTuple database. However, the MetaSQL Editor source code can be modified to work with other database applications.