Package com.spotfire.ws.im.ds.sql
Interface SQLRuntime
- All Known Implementing Classes:
BasicSQLRuntime
public interface SQLRuntime
This interface should be implemented when full control over the SQL execution
is required. An implementation of this class can be specified in a data source template.
By using wrapper classes for the returned Statement,
PreparedStatement and ResultSet objects it is
possible to customize the driver's implementation.
The following methods are called directly by Information Services:
ResultSet: |
setFetchSize, getFetchSize, next,
getDate, getTime, getTimestamp,
getInt, getLong, getFloat,
getDouble, getBoolean,
getCharacterStream, getBinaryStream,
getString, wasNull, getStatement,
getMetaData, close |
Statement: |
cancel, close, executeUpdate,
executeQuery |
PreparedStatement: |
close, addBatch, executeUpdate,
executeBatch, setNull, setDate,
setTime, setTimestamp,
setCharacterStream, setBinaryStream,
setObject |
- Since:
- 3.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionexecuteQuery(String sql) Executes a SQL query.voidexecuteUpdate(String sql) Executes a SQL statement.prepareCall(String sql) Creates aCallableStatementobject for calling database stored procedures.prepareQuery(String sql) prepareUpdate(String sql) voidsetConnection(Connection conn) Sets the JDBC database connection.voidSets the JDBC context.
-
Method Details
-
setConnection
Sets the JDBC database connection.- Parameters:
conn- connection- Since:
- 3.0
-
getConnection
Connection getConnection()- Returns:
- Returns the JDBC database connection.
- Since:
- 3.0
-
setContext
Sets the JDBC context.- Parameters:
c- JDBCContext- Since:
- 3.0
-
getContext
JDBCContext getContext()- Returns:
- Returns the JDBC context.
- Since:
- 3.0
-
executeUpdate
Executes a SQL statement.- Parameters:
sql- SQL- Throws:
SQLException- SQLException- Since:
- 3.0
-
prepareUpdate
- Parameters:
sql- SQL- Returns:
- Creates a precompiled SQL statement.
- Throws:
SQLException- SQLException- Since:
- 3.0
-
prepareQuery
- Parameters:
sql- SQL- Returns:
- Creates a precompiled SQL statement for a parameterized query.
- Throws:
SQLException- SQLException- Since:
- 3.0
-
executeQuery
Executes a SQL query.- Parameters:
sql- SQL- Returns:
- ResultSet
- Throws:
SQLException- SQLException- Since:
- 3.0
-
prepareCall
Creates aCallableStatementobject for calling database stored procedures.- Parameters:
sql- SQL- Returns:
- CallableStatement
- Throws:
SQLException- SQLException- Since:
- 3.0
-