Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
74bd139b
Commit
74bd139b
authored
Apr 22, 2021
by
Carsten Rose
Browse files
reformat doc for report keywords
parent
e30af25a
Pipeline
#5164
failed with stages
in 5 minutes
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Documentation/Concept.rst
View file @
74bd139b
...
...
@@ -89,81 +89,98 @@ QFQ Keywords (Bodytext)
**All of these parameters are optional.**
+-------------------+---------------------------------------------------------------------------------+
| Name | Explanation |
+===================+=================================================================================+
| form | | Formname. |
| | | Static: **form = person** |
| | | By SIP: **form = {{form:SE}}** |
| | | By SQL: **form = {{SELECT c.form FROM Config AS c WHERE c.id={{a:C}} }}** |
+-------------------+---------------------------------------------------------------------------------+
| r | | <record id>. The form will load the record with the specified id. |
| | | Static: **r = 123** |
| | | By SQL: **r = {{SELECT ...}}** |
| | | If not specified, the SIP parameter 'r' is used. |
+-------------------+---------------------------------------------------------------------------------+
| dbIndex | E.g. `dbIndex = {{indexQfq:Y}}` Select a DB index. Only necessary if a |
| | different than the standard DB should be used. |
+-------------------+---------------------------------------------------------------------------------+
| debugShowBodyText | If='1' and :ref:`configuration`:*showDebugInfo: yes*, shows a |
| | tooltip with bodytext |
+-------------------+---------------------------------------------------------------------------------+
| sqlLog | Overwrites :ref:`configuration`: :ref:`SQL_LOG` . Only affects `Report`, |
| | not `Form`. |
+-------------------+---------------------------------------------------------------------------------+
| sqlLogMode | Overwrites :ref:`configuration`: :ref:`SQL_LOG_MODE<SQL_LOG_MODE>` . |
| | Only affects `Report`, not `Form`. |
+-------------------+---------------------------------------------------------------------------------+
| render | See :ref:`report-render`. Overwrites :ref:`configuration`: render. |
+-------------------+---------------------------------------------------------------------------------+
| <level>.fbeg | Start token for every field (=column) |
+-------------------+---------------------------------------------------------------------------------+
| <level>.fend | End token for every field (=column) |
+-------------------+---------------------------------------------------------------------------------+
| <level>.fsep | Separator token between fields (=columns) |
+-------------------+---------------------------------------------------------------------------------+
| <level>.fskipwrap | Skip wrapping (via fbeg, fsep, fend) of named columns. Comma separated list of |
| | column id's (starting at 1). See also the special column name '_noWrap' to |
| | suppress wrapping. |
+-------------------+---------------------------------------------------------------------------------+
| <level>.shead | Static start token for whole <level>, independent if records are selected |
| | Shown before `head`. |
+-------------------+---------------------------------------------------------------------------------+
| <level>.stail | Static end token for whole <level>, independent if records are selected. |
| | Shown after `tail`. |
+-------------------+---------------------------------------------------------------------------------+
| <level>.head | Dynamic start token for whole <level>. Only if at least one record is select. |
+-------------------+---------------------------------------------------------------------------------+
| <level>.tail | Dynamic end token for whole <level>. Only if at least one record is select. |
+-------------------+---------------------------------------------------------------------------------+
| <level>.rbeg | Start token for row. |
+-------------------+---------------------------------------------------------------------------------+
| <level>.rbgd | Alternating (per row) token. |
+-------------------+---------------------------------------------------------------------------------+
| <level>.rend | End token for row. Will be rendered **before** subsequent levels are processed |
+-------------------+---------------------------------------------------------------------------------+
| <level>.renr | End token for row. Will be rendered **after** subsequent levels are processed |
+-------------------+---------------------------------------------------------------------------------+
| <level>.rsep | Seperator token between rows |
+-------------------+---------------------------------------------------------------------------------+
| <level>.sql | SQL Query |
+-------------------+---------------------------------------------------------------------------------+
| <level>.twig | Twig Template |
+-------------------+---------------------------------------------------------------------------------+
| <level>.althead | If <level>.sql has no rows selected (empty), these token will be rendered. |
+-------------------+---------------------------------------------------------------------------------+
| <level>.altsql | If <level>.sql has no rows selected (empty) or affected (delete, update, insert)|
| | the <altsql> will be fired. Note: Sub queries of <level> are not fired, even if |
| | <altsql> selects some rows. |
+-------------------+---------------------------------------------------------------------------------+
| <level>.content | | *show* (default): content of current and sub level are directly shown. |
| | | *hide*: content of current and sub levels are stored and not shown. |
| | | *hideLevel*: content of current and sub levels are stored and only sub levels |
| | | are shown. |
| | | *store*: content of current and sub levels are stored and shown. |
| | | To retrieve the content: `{{<level>.line.content}}`. |
| | | See :ref:`syntax-of-report` |
+-------------------+---------------------------------------------------------------------------------+
+-------------------------+---------------------------------------------------------------------------------+
| Name | Explanation |
+=========================+=================================================================================+
| form | | Formname. |
| | | Static: **form = person** |
| | | By SIP: **form = {{form:SE}}** |
| | | By SQL: **form = {{SELECT c.form FROM Config AS c WHERE c.id={{a:C}} }}** |
+-------------------------+---------------------------------------------------------------------------------+
| r | | <record id>. The form will load the record with the specified id. |
| | | Static: **r = 123** |
| | | By SQL: **r = {{SELECT ...}}** |
| | | If not specified, the SIP parameter 'r' is used. |
+-------------------------+---------------------------------------------------------------------------------+
| dbIndex | E.g. `dbIndex = {{indexQfq:Y}}` Select a DB index. Only necessary if a |
| | different than the standard DB should be used. |
+-------------------------+---------------------------------------------------------------------------------+
| debugShowBodyText | If='1' and :ref:`configuration`:*showDebugInfo: yes*, shows a |
| | tooltip with bodytext |
+-------------------------+---------------------------------------------------------------------------------+
| sqlLog | Overwrites :ref:`configuration`: :ref:`SQL_LOG` . Only affects `Report`, |
| | not `Form`. |
+-------------------------+---------------------------------------------------------------------------------+
| sqlLogMode | Overwrites :ref:`configuration`: :ref:`SQL_LOG_MODE<SQL_LOG_MODE>` . |
| | Only affects `Report`, not `Form`. |
+-------------------------+---------------------------------------------------------------------------------+
| render | See :ref:`report-render`. Overwrites :ref:`configuration`: render. |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.fbeg | Start token for every field (=column) |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.fend | End token for every field (=column) |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.fsep | Separator token between fields (=columns) |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.fskipwrap | Skip wrapping (via fbeg, fsep, fend) of named columns. Comma separated list of |
| | column id's (starting at 1). See also the special column name '_noWrap' to |
| | suppress wrapping. |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.shead | Static start token for whole <level>, independent if records are selected |
| | Shown before `head`. |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.stail | Static end token for whole <level>, independent if records are selected. |
| | Shown after `tail`. |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.head | Dynamic start token for whole <level>. Only if at least one record is select. |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.tail | Dynamic end token for whole <level>. Only if at least one record is select. |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.rbeg | Start token for row. |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.rbgd | Alternating (per row) token. |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.rend | End token for row. Will be rendered **before** subsequent levels are processed |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.renr | End token for row. Will be rendered **after** subsequent levels are processed |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.rsep | Seperator token between rows |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.sql | SQL Query |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.twig | Twig Template |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.althead | If <level>.sql has no rows selected (empty), these token will be rendered. |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.altsql | If <level>.sql has no rows selected (empty) or affected (delete, update, insert)|
| | the <altsql> will be fired. Note: Sub queries of <level> are not fired, even if |
| | <altsql> selects some rows. |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.content | | *show* (default): content of current and sub level are directly shown. |
| | | *hide*: content of current and sub levels are **stored** and not shown. |
| | | *hideLevel*: content of current and sub levels are **stored** and only sub |
| | | levels are shown. |
| | | *store*: content of current and sub levels are **stored** and shown. |
| | | To retrieve the content: `{{<level>.line.content}}`. |
| | | See :ref:`syntax-of-report` |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.line.count | Current row index. Will be replaced before the query is fired in case of |
| | ``<level>`` is an outer/previous level or it will be replaced after a query is |
| | fired in case ``<level>`` is the current level. |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.line.total | Total rows (MySQL ``num_rows`` for *SELECT* and *SHOW*, MySQL ``affected_rows`` |
| | for *UPDATE* and *INSERT*. |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.line.insertId | Last insert id for *INSERT*. |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.line.content | Show content of `<level>` (content have to be stored via <level>.content=....) |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.line.altCount | Like 'line.count' but for 'alt' query. |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.line.altTotal | Like 'line.total' but for 'alt' query. |
+-------------------------+---------------------------------------------------------------------------------+
| <level>.line.altInsertId| Like 'line.insertId' but for 'alt' query. |
+-------------------------+---------------------------------------------------------------------------------+
.. _`report-render`:
...
...
Documentation/Report.rst
View file @
74bd139b
...
...
@@ -142,26 +142,7 @@ There is a set of **variables** that will get replaced before ('count' also afte
``{{
<level>
.
<columnName>
}}``
Similar to ``{{
<name>
:R}}`` but more specific. There is no sanitize class, escape mode or default value.
``{{
<level>
.line.count}}`` - Current row index
This variable is specific, as it will be replaced before the query is fired in case of ``
<level>
`` is an outer/previous
level or it will be replaced after a query is fired in case ``
<level>
`` is the current level.
``{{
<level>
.line.total}}``
Total rows (MySQL ``num_rows`` for *SELECT* and *SHOW*, MySQL ``affected_rows`` for *UPDATE* and *INSERT*.
``{{
<level>
.line.insertId}}``
Last insert id for *INSERT*.
``{{
<level>
.line.content}}``
If the content of `
<level>
` have been stored, e.g. `
<level>
.content=hide`.
``{{
<level>
.line.altCount}}`` - Like 'line.count' but for 'alt' query.
``{{
<level>
.line.altTotal}}`` - Like 'line.total' but for 'alt' query.
``{{
<level>
.line.altInsertId}}`` - Like 'line.insertId' but for 'alt' query.
See :ref:`qfq-keywords-bodytext` for a full list of all QFQ report keywords.
See :ref:`variables` for a full list of all available variables.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment