Div | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
On this page
|
Include Page _SQL for Confluence 11.x announcement _SQL for Confluence 11.x announcement
Overview
SQL, SQL File, and SQL Query macros use data sources to connect to and access your databases. Creating one or more data source profiles is the fastest and most convenient method of establishing a connection. You can also create data source profiles that extend data sources configured within your application server.
Info |
---|
You must provide at least one data source to use this application within Confluence. |
...
Parameter | Macro Parameter | Default | Description | |||||
---|---|---|---|---|---|---|---|---|
Limit rows processed | limit | No limit | The maximum number of rows to be processed and displayed by SQL macros. This prevents queries that result in a large number of rows from using excessive resources. Individual queries can use the limit parameter to override this value. The following options are available from a selection list:
| |||||
Limit query time | queryTimeout | None | The number of seconds that a query can take before a forced timeout. This prevents queries that take too long from impacting other users. Individual queries can use the queryTimeout parameter to override this value.
| |||||
Limit max active | maxActive | None | Limit the number of actively executing SQL queries for a specific data source. Once the maximum active limit is reached, the next requested render of a SQL macro using the specific data source returns an error message instead of trying to connect to the database. See this article for additional information. | |||||
Show sql options | showSqlOptions | None | A comma-separated list of code or code-pro (Code Pro Macro) parameters used when Show SQL is selected. This allows for customization of how the SQL code is shown. See How to improve the display of SQL source. Since 6.4 | |||||
Connection properties | connectionProperties | None | A list of driver specific properties passed to the driver for creating connections. Each property is given as name=value , multiple properties are separated by semicolons (; ). See Apache Tomcat JNDI resources. | |||||
Initial SQLs | initalSql<n> | None | SQL that is run after the SQL connection is established where n is a number (1, 2, 3, ...). Multiple initial SQL statements are allowed to support databases that only allow single SQL statements. Example use for Oracle:
No results are kept and any errors generates a macro exception. Using beforeSql is recommended for Postgres and other database that support multiple SQL statements as it is more efficient than multiple separated actions. | |||||
Before SQL | beforeSql | None | SQL that is added before macro defined SQL. | |||||
After SQL | afterSql | None | SQL that is added after macro defined SQL. |
...