All Packages This Package Previous Next
Interface sqlj.runtime.profile.ref.DynamicProfile
- public interface interface DynamicProfile
- extends ConnectedProfile
A dynamic connected profile instance is a connected profile that has the
additional ability to create statements dynamically based on the text of
a sql string (similar to the functionality of a jdbc connections'
prepareCall/prepareStatement methods).
Note: In general, ConnectedProfiles are not expected to support
dynamic operations. However, there are some cases that require the
ability to dynamically create statement objects based on sql text
caluculated at runtime. For example, in the case of positioned update
or delete, the JDBC specification mandates that the name of the cursor
be part of the sql operation text, but the name of the cursor cannot
be discovered until runtime.
- See Also:
- PositionedProfile
-
prepareCall(String)
- Returns a statement object prepared to execute the passed sql
operation text.
-
prepareStatement(String)
- Returns a statement object prepared to execute the passed sql
operation text.
prepareStatement
public abstract RTStatement prepareStatement(String sql) throws SQLException
- Returns a statement object prepared to execute the passed sql
operation text. The statement is not expected to contain
out-parameters.
- Parameters:
- sql - the text of the sql operation in obdc syntax.
- Throws: SQLException
- if an error occurs creating the statement.
prepareCall
public abstract RTStatement prepareCall(String sql) throws SQLException
- Returns a statement object prepared to execute the passed sql
operation text. The statement may contain out-parameters.
Note: Since the statement returned has been dynamically
created, there is no way for the implementation of this method to know
what the expected bind-types of the statement are. Therefore, it is
the responsibility of the client to register any out parameters on the
statement returned (via calls on the underlying JDBC callable
statement associated with the statement).
- Parameters:
- sql - the text of the sql operation in obdc syntax.
- Throws: SQLException
- if an error occurs creating the statement.
All Packages This Package Previous Next