Pragma

Query Processor Directive.

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:


Syntax

Pragma

graphics/Pragma.png

TaminoQPIOptimization TaminoQPIExecution TaminoQPIExplain SerializationSpec

Description

A Pragma is part of the query prolog and provides directives for processing the query. In general, pragmas are extension expressions which are expressions whose semantics are implementation-defined. In Tamino, pragmas are syntactically similar to processing instructions. However, they are called query processing instructions (QPI) and are denoted by curly braces as delimiters instead of angle brackets:

 "{?" + PragmaName + " " + PragmaContents + " "* +"?}"

Note that the pragma name must immediately follow the opening delimiter while this is not required for the closing delimiter, so {?explain?} is valid, while {? explain ?} is not. The following pragmas are available

  • TaminoQPIOptimization sets parameter for optimizing certain parts of query processing.

  • TaminoQPIExecution sets parameter for tuning execution of user-defined functions.

  • TaminoQPIInline determines a strategy for inlining user-defined functions.

  • TaminoQPIExplain retrieves the query execution plan.

  • SerializationSpec determines the way Tamino serializes the query result.

Note:
The syntax proposed for pragmas in recent working drafts of the XQuery standard is not supported so that using "(::" and "::)" as delimiters yields a syntax error.