Availability
This routine is available since katl-commons 3.0.3
Syntax:
sqlCallStoredProcedure(datasourceName, procedureName, [...])
Description:
Executes the stored procedure over the defined datasource name / JNDI datasource.Parameters:
Parameter name | Type | Required | Description |
---|---|---|---|
datasourceName | string | yes | The datasource name / JNDI name. For JIRA database, this is set to "jdbc/JiraDS" by default |
procedureName | string | yes | the stored procedure name |
The routine accepts multiple parameters, in this case the sql statement being pushed as prepared into the database (check the second example below for right syntax).
Returns:
string []
Example:
Example 1:
string [] results = sqlCallStoredProcedure("myDB", "showMessage");
Where showMessage() is a stored procedure existing in myDB database.
Example 2:
string [] results = sqlCallStoredProcedure("myDB", "addComponent", "componentId", "componentName");
Where addComponent(String id, String name) is a stored procedure existing in myDB database.
Notes:
To see how you should configure the data source, check the corresponding configuration chapter: SQL Data Sources.
See Also:
-
-
sqlCallStoredProcedureWithOutParams (Power Scripts for Jira Cloud)
-
-
-
-
-
-
-
-
-
-
-
-
sqlCallStoredProcedureWithOutParams (Power Scripts™ for Confluence)
-