Feature #17295
Updated by Krzysztof Putyra 6 months ago
The syntax
<pre> <value> AS 'col1|col2|col3' </pre>
can represent a processing queue of @value@ by three processors with the output of last one taken as the column value. In this example the process queue is
<pre>
+------+ +------+ +------+
<value> -->--| col1 |-->--| col2 |-->--| col3 |-->-- <processed>
+------+ +------+ +------+
</pre>
Notes:
* a column name that do not begin with an underscore is processed by the default processor that saves the value in the R-store and forwards it to the next processor
* a column name @_<name>@ that is not a special column name is semantically equal to @_hide|<name>@
**Example 1**
<pre>
10.sql=SELECT 'Hello world!' AS 'plain|_encrypt|encrypted|_hide'
10.10.sql=SELECT 'Plain text: {{plain:R}}<br>Encrypted text: {{encrypted:R}}'
</pre>
produces
<pre>
Plain text: Hello world!
Encrypted text: <encrypted>
</pre>
**Example 2**
<pre>
10.sql=SELECT 'Hello world!' AS message|_+p
20.sql=SELECT '{{message:R}}'
</pre>
produces
<pre>
<p>Hello world!</p>
Hello world!
</pre>
**Compatibility**
This feature is not fully compatible with the current approach.
# Currently special columns (except @_nowrap@ and @_hide@) are expected to be listed as first, but they only affect the rendered content and not the value. This may not be the desired behavior: the value encrypted by @_encrypt@ or the token generated by @_jwt@ cannot be stored currently in a variable.
# The behavior of @_hide@ and @_nowrap@ is unchanged - these processors are not expected to change the value of the column.
Notes:
* In case the current behavior is expected, this feature must implement a way to mark a report to be processed in the new or in the legacy mode. For now the legacy mode should be the default one for backwards compatibility.
* The new mode can be automatically turned on when a new syntax is used, such as aliases or columns with parameters, unless these features are released earlier.
* Another option is to modify only the value of @{{&<variable>:R}}@.