Skip to content

Stored Procedure

Purpose

Execute a stored procedure and return the results. Stored procedures are either UserDefined or are part of a reserved set provided with Platform 6.

Methods

Binding name: sproc


Method: long buildDataSource(String procId, Map parameters, String dataSourceName, boolean appendToDataSource)

Execute a query which will create a new table in the database. The query is found with its identifier. The argument appendToDataSource specifies if you add the records in the table if it already exists.


Method: long buildDataSource(String procId, Map parameters, String dataSourceName)

Execute a query which will create a new table in the database. The query is found with its identifier. It will not append records in the table if it already exists.


Method: long buildDataSource(String entityName, String procedureName, Map paramMap, String dataSourceName, boolean appendToDataSource)

Warning

This method is deprecated. It has been kept for keeping the compatibility with existing scripts. Please use the methods above.

Execute a query which will create a new table in the database. The query is found with its entity and its name. The argument appendToDataSource specifies if you add the records in the table if it already exists.


Method: long buildDataSource(String entityName, String procedureName, Map paramMap, String dataSourceName)

Warning

This method is deprecated. It has been kept for keeping the compatibility with existing scripts. Please use the methods above.

Execute a query which will create a new table in the database. The query is found with its entity and its name. It will not append records in the table if it already exists.


Method: String[][] execute(String procedureId)

Executes the procedure with its identifier. The response is the execution’s result as a list of list of Strings.


Method: String[][] execute(String procedureId, Map parameters)

Executes the procedure with its identifier and additional parameters. The response is the execution’s result as a list of list of Strings.


Method: String[][] execute(String entityName, String procedureName)

Warning

This method is deprecated. It has been kept for keeping the compatibility with existing scripts. Please use the methods above.

Executes the named procedure on the named storage entity with no parameters. The return type is a list of list of Strings.


Method: String[][] execute(String entityName, String procedureName, Map parameters)

Warning

This method is deprecated. It has been kept for keeping the compatibility with existing scripts. Please use the methods above.

Executes the named procedure on the named storage entity using the Map of parameters. The return type is a list of list of Strings.

Examples

Map mapParams = new HashMap()
mapParams["Adapter ID"] = "groovy"

def resultSet = sproc.execute("UserDefined", "PROC1", mapParams)

println resultSet