RealSQLStatement
The RealSQLStatement
class is responsible for executing
statements and returning results. The client calls RealSQLStatement
's
executeQuery()
method to execute an
SQL statement. This creates new RealSQLResultSetMetaData
and RealSQLResultSet
objects for each SQL statement
processed. Only one ResultSet
can be
active at any point in time - executing an SQL statement will close an active
ResultSet
, which means that any further data access methods invoked
on that ResultSet
will throw an exception.
Two classes extend RealSQLStatement
:
- The
RealSQLPreparedStatement
class asks the server to prepare the supplied SQL statement. Parameterised inputs are supplied separately using thesetXXX()
methods. The statement can be executed multiple times. - The
RealSQLCallableStatement
class asks the server to prepare the supplied stored procedure. Parameterised inputs are supplied separately using thesetXXX()
methods inherited from thePreparedStatement
class.
Reality does not support the return of a ResultSet
from a stored procedure.