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
andResultSet
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
- Author:
- Magnus Rylander
- See Also:
BasicSQLRuntime
,PreparedStatementWrapper
,StatementWrapper
,ResultSetWrapper
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResultSet
executeQuery(String sql)
Executes a SQL query.void
executeUpdate(String sql)
Executes a SQL statement.Connection
getConnection()
JDBCContext
getContext()
CallableStatement
prepareCall(String sql)
Creates aCallableStatement
object for calling database stored procedures.PreparedStatement
prepareQuery(String sql)
PreparedStatement
prepareUpdate(String sql)
void
setConnection(Connection conn)
Sets the JDBC database connection.void
setContext(JDBCContext c)
Sets the JDBC context.
-
-
-
Method Detail
-
setConnection
void setConnection(Connection conn)
Sets the JDBC database connection.- Parameters:
conn
- connection- Since:
- 3.0
-
getConnection
Connection getConnection()
- Returns:
- Returns the JDBC database connection.
- Since:
- 3.0
-
setContext
void setContext(JDBCContext c)
Sets the JDBC context.- Parameters:
c
- JDBCContext- Since:
- 3.0
-
getContext
JDBCContext getContext()
- Returns:
- Returns the JDBC context.
- Since:
- 3.0
-
executeUpdate
void executeUpdate(String sql) throws SQLException
Executes a SQL statement.- Parameters:
sql
- SQL- Throws:
SQLException
- SQLException- Since:
- 3.0
-
prepareUpdate
PreparedStatement prepareUpdate(String sql) throws SQLException
- Parameters:
sql
- SQL- Returns:
- Creates a precompiled SQL statement.
- Throws:
SQLException
- SQLException- Since:
- 3.0
-
prepareQuery
PreparedStatement prepareQuery(String sql) throws SQLException
- Parameters:
sql
- SQL- Returns:
- Creates a precompiled SQL statement for a parameterized query.
- Throws:
SQLException
- SQLException- Since:
- 3.0
-
executeQuery
ResultSet executeQuery(String sql) throws SQLException
Executes a SQL query.- Parameters:
sql
- SQL- Returns:
- ResultSet
- Throws:
SQLException
- SQLException- Since:
- 3.0
-
prepareCall
CallableStatement prepareCall(String sql) throws SQLException
Creates aCallableStatement
object for calling database stored procedures.- Parameters:
sql
- SQL- Returns:
- CallableStatement
- Throws:
SQLException
- SQLException- Since:
- 3.0
-
-