Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.



Div
idProductTOC

On this page

Table of Contents
maxLevel2
excludeOn this page
typeflat
separator |

Description

This macro has the same parameters and behavior as that of the SQL macro. There are two primary reasons for using the SQL Query macro:

  • Read-only Enforcement - Some databases/JDBC drivers support read-only SQL statements. In this case, the SQL Query macro will attempt to use this support if applicable. Otherwise, it behaves exactly like the SQL macro.
    (info) Read-only support means that the database can optimize for read-only statements. For some databases (PostgreSQL, for instance) the read-only condition is enforced while in others, it is a suggestion for improving performance.

  • Security — Using CMSP, administrators can set varying and separate restrictions for the use of the SQL and SQL Query macros. Thus allowing for greater flexibility to people who can run statements without having access to other SQL operations. For instance, administrators can create read-only data sources via database access controls and grant access to specific data sources. 

Usage Parameters

...

Parameter

...

Determines how the output is formatted:

  • HTML — Generates HTML from the result set data. Data is HTML encoded unless encoding has been disabled.
  • XHTML (Pro Edition) — Generates and renders XHTML from result set data. Data is HTML encoded unless encoding has been disabled (disableAntiXss).
  • Wiki — Generates and renders wiki markup from result set data. If the data might contain unintended wiki markup characters, set the escape parameter to true.
  • unrenderedWiki (Pro Edition) — Generates wiki markup from result set data, similar to wiki, without rendering. Wraps with a table-plus macro suitable for copying to another system.

...

Image Added

For more information on:

  • Common SQL parameters, refer to

...

Example: Use SQL File Macro with Markup