SQLFire 1.0

com.vmware.sqlfire.procedure
Interface ProcedureExecutionContext


public interface ProcedureExecutionContext

A context object that can be passed into a PROCEDURE by declaring it as an argument in the static method implementation.


Method Summary
 String[] getColocatedTableNames()
          Returns an array of colocated tables in this server in the format "schemaName.tableName".
 Connection getConnection()
          A "nested" JDBC connection that can be used by the procedure to execute SQL.
 String getFilter()
          Returns the whereClause for this execution, or null if there wasn't one
 OutgoingResultSet getOutgoingResultSet(int resultSetNumber)
          Create and return an empty container for an output result set.
 String getProcedureName()
          Return the name of this procedure.
 String getTableName()
          Returns the table name in the format "schemaName.tableName" if this procedure was executed with an ON TABLE clause, or null otherwise.
 boolean isPartitioned(String tableName)
          Returns true if the specified table is a partitioned table, false if it is a replicated table.
 boolean isPossibleDuplicate()
          Return true if this is a re-attempt occurring after a member of the distributed system has failed.
 

Method Detail

getFilter

String getFilter()
Returns the whereClause for this execution, or null if there wasn't one


getTableName

String getTableName()
Returns the table name in the format "schemaName.tableName" if this procedure was executed with an ON TABLE clause, or null otherwise.


getColocatedTableNames

String[] getColocatedTableNames()
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.


getProcedureName

String getProcedureName()
Return the name of this procedure.


getConnection

Connection getConnection()
A "nested" JDBC connection that can be used by the procedure to execute SQL. If the SQL query string begins with the "" escape sequence, then execution will be restricted to local execution only, and only on the data "assigned" to this procedure on this server. This Connection is the same Connection obtained with DriverManager.getConnection("jdbc:default:connection");


isPossibleDuplicate

boolean isPossibleDuplicate()
Return true if this is a re-attempt occurring after a member of the distributed system has failed. For some procedure implementations that are doing write operations, special handling may be necessary if this is a possible duplicate invocation on this data.


isPartitioned

boolean isPartitioned(String tableName)
Returns true if the specified table is a partitioned table, false if it is a replicated table.

Parameters:
tableName - name of table as "schemaName.tableName", or just "tableName" with default schema assumed.

getOutgoingResultSet

OutgoingResultSet getOutgoingResultSet(int resultSetNumber)
Create and return an empty container for an output result set.

Parameters:
resultSetNumber - the index to assign to this result set as one of the result sets declared for this procedure.

SQLFire 1.0

Copyright © 2010-2011 VMware, Inc. All rights reserved.