Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

databaseAvailable(dbstring [, sqlstring])

Package

sql

Alias

Pkg Usage

available(dbstring [, sqlstring])

Description

Excerpt
hiddentrue

Checks if the database is available.

Checks if the database is available. Optionally, it can check also the availability of the results for the SQL passed in as the second parameter.

...

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

Parameter name

Type

Required

Description

dbstring

String

Yes

Datasource JNDI name or the datasource name. For Jira database, this is set to "jdbc/JiraDS" by default, if exported.

sqlstring

String

No

SQL string.

Return Type

Boolean (true/false)

...

Let's suppose in our examples `TextField` is a custom field text already configured for the current Jira server instance and `TestDB` represents the database resource name configured in the server context. For more details see SQL data sources.

Code Block
TextField=databaseAvailable("TestDB"); //will set 'TextField' value to 'true'

...

Note

To configure the data source check the SQL data sources configuration chapter.

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "system_routine" and space = currentSpace ( )
labelsarray_routines