Parses the subquery expression specified in the parameter string and compiles it into the executable object representation ready for execution.
You may use this function to construct some necessary queries dynamically. For instance, using it you may program controlling the behavior of a subtemplate by passing to it a single compact subexpression that tests a certain external condition (rather than passing to that subtemplate an equivalent batch of parameters representing the same condition and, then, sorting them out using some cumbersome statically defined expression).
Parameter:
expr
The string containing the subquery expression.You may use within that expression any other variables assigned within the main expression before calling this function.
Note: Any syntax errors within the subquery expression will be found only during the execution of this function, which will cause the appearance of the error message. You may write and check the subquery separately using the Subexpression Editor (found at the left panel's tree) and, then, insert it as string into the main expression.
Returns:
The reference to the compiled subquery ornull
, when the passed expression was a blank string (or contained nothing but comments).Note: The returned compiled representation of the subquery is the same as the one produced by the
FlexQuery()
function call:where the expression specified in theFlexQuery({ expr })
expr
parameter string is written directly in the curly brackets.
See Also:
execFlexQuery(), FlexQuery()