1.0

Table Of Contents
DescriptionMethod
Returns an array of colocated tables in this server in the format
"schemaName.tableName". If this procedure was not called with an
ON TABLE clause, then this method returns null.
getColocatedTableNames()
Return the name of this procedure.getProcedureName()
A "nested" JDBC connection that can be used by the procedure to
execute SQL.
getConnection()
Return true if this is a re-attempt occurring after a member of the
distributed system has failed. For some procedure implementations
isPossibleDuplicate()
that are doing write operations, special handling may be necessary
if this is a possible duplicate invocation on this data.
Returns true if the specied table is a partitioned table, false if it is
a replicated table.
isPartitioned(String tableName)
Create and return an empty container for an output result set.
resultSetNumber is the index to assign to this result set as one of the
result sets declared for this procedure.
getOutgoingResultSet(int resultSetNumber)
OutgoingResultSet
OutgoingResultSet is an interface for constructing an outgoing result set by adding rows as List<Object>.
The methods in this interface are:
DescriptionMethod
Specify the name of the next column for this results set. The names
for all the columns should be specied before addRow is called,
addColumn(String name)
unless the default names are desired. Default column names will be
used for any columns that have not been named by calling this
method: "c1", "c2", etc.
Add a row to this result set, to be sent to the ResultCollector. The
column descriptions should be added with addColumn before this
addRow(List<Object> row)
method is called, otherwise default column descriptions will be
inferred based on the rst row added with columns named "c1", "c2",
etc.
Invoke this method to let the result set know that there are no more
rows to be added.
endResults()
Example
--The procedure retrieveDynamicResultsWithOutgoingResultSet
a stored
--procedure which returns 0, 1, 2, 3 or 4 ResultSet.
public static void
retrieveDynamicResultsWithOutgoingResultSet(int number,
ResultSet[] rs1, ResultSet[] rs2, ResultSet[] rs3,
ResultSet[] rs4, ProcedureExecutionContext pec)
throws SQLException {
Connection c = pec.getConnection();
if (number > 0) {
rs1[0] =
c.createStatement().executeQuery("VALUES(1)");
}
if (number > 1) {
OutgoingResultSet ors=pec.getOutgoingResultSet(2);
425
SQLFire API