- All Implemented Interfaces:
AutoCloseable
,CallableStatement
,PreparedStatement
,Statement
,Wrapper
,FirebirdCallableStatement
,FirebirdPreparedStatement
,FirebirdStatement
CallableStatement
.
This class is internal API of Jaybird. Future versions may radically change, move, or make inaccessible this type.
For the public API, refer to the CallableStatement
and FirebirdCallableStatement
interfaces.
- Author:
- David Jencks, Roman Rokytskyy, Steven Jardine, Mark Rotteveel
-
Nested Class Summary
Nested classes/interfaces inherited from class org.firebirdsql.jdbc.FBStatement
FBStatement.StatementResult
-
Field Summary
FieldsFields inherited from class org.firebirdsql.jdbc.FBPreparedStatement
METHOD_NOT_SUPPORTED
Fields inherited from class org.firebirdsql.jdbc.FBStatement
currentStatementResult, fbStatement, gdsHelper, isSingletonResult, specialResult, statementListener
Fields inherited from class org.firebirdsql.jdbc.AbstractStatement
connection
Fields inherited from interface org.firebirdsql.jdbc.FirebirdPreparedStatement
TYPE_COMMIT, TYPE_DDL, TYPE_DELETE, TYPE_EXEC_PROCEDURE, TYPE_GET_SEGMENT, TYPE_INSERT, TYPE_PUT_SEGMENT, TYPE_ROLLBACK, TYPE_SAVEPOINT, TYPE_SELECT, TYPE_SELECT_FOR_UPDATE, TYPE_SET_GENERATOR, TYPE_START_TRANS, TYPE_UPDATE
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
FBCallableStatement
(FBConnection connection, String sql, ResultSetBehavior rsBehavior, StoredProcedureMetaData storedProcMetaData, FBObjectListener.StatementListener statementListener, FBObjectListener.BlobListener blobListener) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBatch()
protected ResultSet
assertHasData
(@Nullable ResultSet rs) Asserts if the current statement has data to return.void
void
close()
protected FBResultSet
createSpecialResultSet
(@Nullable FBObjectListener.ResultSetListener resultSetListener) Create the result set forspecialResult
.boolean
execute()
int
protected ResultSet
Returns the result set for the singleton row of the callable statement and asserts it has data.@Nullable Array
getArray
(int parameterIndex) @Nullable Array
@Nullable BigDecimal
getBigDecimal
(int parameterIndex) @Nullable BigDecimal
getBigDecimal
(int parameterIndex, int scale) Deprecated.@Nullable BigDecimal
getBigDecimal
(String colName) @Nullable Blob
getBlob
(int parameterIndex) @Nullable Blob
boolean
getBoolean
(int parameterIndex) boolean
getBoolean
(String colName) byte
getByte
(int parameterIndex) byte
byte @Nullable []
getBytes
(int parameterIndex) byte @Nullable []
@Nullable Reader
getCharacterStream
(int parameterIndex) @Nullable Reader
getCharacterStream
(String parameterName) @Nullable Clob
getClob
(int parameterIndex) @Nullable Clob
getDate
(int parameterIndex) @Nullable Date
@Nullable Date
@Nullable Date
double
getDouble
(int parameterIndex) double
float
getFloat
(int parameterIndex) float
int
getInt
(int parameterIndex) int
long
getLong
(int parameterIndex) long
@Nullable ResultSetMetaData
@Nullable Reader
getNCharacterStream
(int parameterIndex) @Nullable Reader
getNCharacterStream
(String parameterName) @Nullable NClob
getNClob
(int parameterIndex) @Nullable NClob
@Nullable String
getNString
(int parameterIndex) @Nullable String
getNString
(String parameterName) @Nullable Object
getObject
(int parameterIndex) <T extends @Nullable Object>
@Nullable T@Nullable Object
@Nullable Object
<T extends @Nullable Object>
@Nullable T@Nullable Object
@Nullable Ref
getRef
(int parameterIndex) @Nullable Ref
@Nullable RowId
getRowId
(int parameterIndex) @Nullable RowId
short
getShort
(int parameterIndex) short
@Nullable SQLXML
getSQLXML
(int parameterIndex) @Nullable SQLXML
@Nullable String
getString
(int parameterIndex) @Nullable String
@Nullable Time
getTime
(int parameterIndex) @Nullable Time
@Nullable Time
@Nullable Time
@Nullable Timestamp
getTimestamp
(int parameterIndex) @Nullable Timestamp
getTimestamp
(int parameterIndex, @Nullable Calendar cal) @Nullable Timestamp
getTimestamp
(String colName) @Nullable Timestamp
getTimestamp
(String colName, @Nullable Calendar cal) @Nullable URL
getURL
(int parameterIndex) @Nullable URL
protected boolean
internalExecute
(boolean sendOutParams) Execute this statement.boolean
Retrieve if this callable statement has been marked as selectable.protected void
We allow multiple calls to this method without re-preparing the statement.void
registerOutParameter
(int parameterIndex, int sqlType) void
registerOutParameter
(int parameterIndex, int sqlType, int scale) void
registerOutParameter
(int parameterIndex, int sqlType, String typeName) void
registerOutParameter
(int parameterIndex, SQLType sqlType) void
registerOutParameter
(int parameterIndex, SQLType sqlType, int scale) void
registerOutParameter
(int parameterIndex, SQLType sqlType, String typeName) void
registerOutParameter
(String param1, int param2) void
registerOutParameter
(String param1, int param2, int param3) void
registerOutParameter
(String param1, int param2, String param3) void
registerOutParameter
(String parameterName, SQLType sqlType) void
registerOutParameter
(String parameterName, SQLType sqlType, int scale) void
registerOutParameter
(String parameterName, SQLType sqlType, String typeName) void
setAsciiStream
(String parameterName, @Nullable InputStream x) void
setAsciiStream
(String param1, @Nullable InputStream param2, int param3) void
setAsciiStream
(String parameterName, @Nullable InputStream x, long length) void
setBigDecimal
(int parameterIndex, @Nullable BigDecimal x) void
setBigDecimal
(String param1, @Nullable BigDecimal param2) void
setBinaryStream
(int parameterIndex, @Nullable InputStream inputStream) void
setBinaryStream
(int parameterIndex, @Nullable InputStream inputStream, int length) void
setBinaryStream
(int parameterIndex, @Nullable InputStream inputStream, long length) void
setBinaryStream
(String parameterName, @Nullable InputStream x) void
setBinaryStream
(String param1, @Nullable InputStream param2, int param3) void
setBinaryStream
(String parameterName, @Nullable InputStream x, long length) void
setBlob
(int parameterIndex, @Nullable InputStream inputStream) void
setBlob
(int parameterIndex, @Nullable InputStream inputStream, long length) void
void
setBlob
(String parameterName, @Nullable InputStream inputStream) void
setBlob
(String parameterName, @Nullable InputStream inputStream, long length) void
void
setBoolean
(int parameterIndex, boolean x) void
setBoolean
(String param1, boolean param2) void
setByte
(int parameterIndex, byte x) void
void
setBytes
(int parameterIndex, byte @Nullable [] x) void
void
setCharacterStream
(int parameterIndex, @Nullable Reader reader) void
setCharacterStream
(int parameterIndex, @Nullable Reader reader, int length) void
setCharacterStream
(int parameterIndex, @Nullable Reader reader, long length) void
setCharacterStream
(String parameterName, @Nullable Reader reader) void
setCharacterStream
(String param1, @Nullable Reader param2, int param3) void
setCharacterStream
(String parameterName, @Nullable Reader reader, long length) void
void
void
void
void
void
void
void
void
void
void
setDouble
(int parameterIndex, double x) void
void
setFloat
(int parameterIndex, float x) void
void
setInt
(int parameterIndex, int x) void
void
setLong
(int parameterIndex, long x) void
void
setNCharacterStream
(String parameterName, @Nullable Reader value) void
setNCharacterStream
(String parameterName, @Nullable Reader value, long length) void
void
void
void
setNString
(String parameterName, @Nullable String value) void
setNull
(int parameterIndex, int sqlType) void
void
void
void
void
void
void
void
void
protected void
Set required types for output parameters.void
void
setSelectableProcedure
(boolean selectableProcedure) Mark this callable statement as a call of the selectable procedure.void
setShort
(int parameterIndex, short x) void
void
void
void
void
void
void
void
void
setTimestamp
(int parameterIndex, @Nullable Timestamp x) void
setTimestamp
(int parameterIndex, @Nullable Timestamp x, @Nullable Calendar cal) void
setTimestamp
(String param1, @Nullable Timestamp param2) void
setTimestamp
(String param1, @Nullable Timestamp param2, @Nullable Calendar param3) void
boolean
wasNull()
Methods inherited from class org.firebirdsql.jdbc.FBPreparedStatement
addBatch, clearParameters, completeStatement, execute, execute, execute, execute, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getField, getParameterDescriptor, getParameterMetaData, isGeneratedKeyQuery, notifyStatementCompleted, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setObject, setObject, setRef, setRowId, setSQLXML, setUnicodeStream, setURL
Methods inherited from class org.firebirdsql.jdbc.FBStatement
cancel, createBatchUpdateException, createBatchUpdateException, createStatementListener, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeBatch, executeImpl, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getCurrentResultSet, getDeletedRowsCount, getExecutionPlan, getExplainedExecutionPlan, getInsertedRowsCount, getLargeUpdateCount, getLargeUpdateCountMinZero, getMaxFieldSize, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSet, getStatementHandle, getStatementType, getUpdateCount, getUpdateCountMinZero, getUpdatedRowsCount, hasOpenResultSet, internalExecute, internalExecute, isSimpleIdentifier, isValid, isWrapperFor, nativeSQL, notifyStatementCompleted, notifyStatementStarted, notifyStatementStarted, setEscapeProcessing, setMaxFieldSize, setQueryTimeout, unwrap
Methods inherited from class org.firebirdsql.jdbc.AbstractStatement
addWarning, checkValidity, clearWarnings, closeOnCompletion, completeStatement, equals, fetchConfig, getConnection, getCursorName, getFetchDirection, getFetchSize, getLargeMaxRows, getLocalStatementId, getMaxRows, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getWarnings, hashCode, isClosed, isCloseOnCompletion, isPoolable, performCloseOnCompletion, resultSetBehavior, setCursorName, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxRows, setPoolable, withLock
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.sql.CallableStatement
setObject, setObject
Methods inherited from interface org.firebirdsql.jdbc.FirebirdPreparedStatement
getStatementType
Methods inherited from interface org.firebirdsql.jdbc.FirebirdStatement
getCurrentResultSet, getDeletedRowsCount, getExecutionPlan, getExplainedExecutionPlan, getInsertedRowsCount, getLastExecutionPlan, getLastExplainedExecutionPlan, getLocalStatementId, getUpdatedRowsCount, hasOpenResultSet, isValid
Methods inherited from interface java.sql.PreparedStatement
clearParameters, executeLargeUpdate, getParameterMetaData, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setObject, setObject, setRef, setRowId, setSQLXML, setUnicodeStream, setURL
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearWarnings, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Field Details
-
selectableProcedure
protected boolean selectableProcedure -
procedureCall
-
-
Constructor Details
-
FBCallableStatement
protected FBCallableStatement(FBConnection connection, String sql, ResultSetBehavior rsBehavior, StoredProcedureMetaData storedProcMetaData, FBObjectListener.StatementListener statementListener, FBObjectListener.BlobListener blobListener) throws SQLException - Throws:
SQLException
-
-
Method Details
-
close
Description copied from class:AbstractStatement
Subclasses overriding this method are expected to call this method with
super.close()
at an appropriate point to mark it closed.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceStatement
- Overrides:
close
in classFBPreparedStatement
- Throws:
SQLException
-
getFirebirdParameterMetaData
- Overrides:
getFirebirdParameterMetaData
in classFBPreparedStatement
- Throws:
SQLException
-
addBatch
- Specified by:
addBatch
in interfacePreparedStatement
- Overrides:
addBatch
in classFBPreparedStatement
- Throws:
SQLException
-
clearBatch
- Specified by:
clearBatch
in interfaceStatement
- Overrides:
clearBatch
in classFBPreparedStatement
- Throws:
SQLException
-
executeBatchInternal
- Overrides:
executeBatchInternal
in classFBPreparedStatement
- Throws:
SQLException
-
setSelectableProcedure
public void setSelectableProcedure(boolean selectableProcedure) Description copied from interface:FirebirdCallableStatement
Mark this callable statement as a call of the selectable procedure. By default, callable statement uses "EXECUTE PROCEDURE" SQL statement to invoke stored procedures that return single row of output parameters or a result set. In former case it retrieves only the first row of the result set.- Specified by:
setSelectableProcedure
in interfaceFirebirdCallableStatement
- Parameters:
selectableProcedure
-true
if the called procedure is selectable.- See Also:
-
isSelectableProcedure
public boolean isSelectableProcedure()Description copied from interface:FirebirdCallableStatement
Retrieve if this callable statement has been marked as selectable.Starting from Firebird 2.1, this value is set automatically from metadata stored in the database. Prior to Firebird 2.1, it must be set manually.
- Specified by:
isSelectableProcedure
in interfaceFirebirdCallableStatement
- Returns:
true
if the called procedure is selectable, false otherwise- See Also:
-
setRequiredTypes
Set required types for output parameters.- Throws:
SQLException
- if something went wrong.
-
prepareFixedStatement
We allow multiple calls to this method without re-preparing the statement. This is a workaround to the issue that the statement is actually prepared only after all OUT parameters are registered.- Overrides:
prepareFixedStatement
in classFBPreparedStatement
- Throws:
SQLException
-
getMetaData
Since we deferred the statement preparation until all OUT params are registered, we ensure that the statement is prepared before the meta data for the callable statement is obtained.
- Specified by:
getMetaData
in interfacePreparedStatement
- Overrides:
getMetaData
in classFBPreparedStatement
- Throws:
SQLException
-
execute
- Specified by:
execute
in interfacePreparedStatement
- Overrides:
execute
in classFBPreparedStatement
- Throws:
SQLException
-
executeQuery
- Specified by:
executeQuery
in interfacePreparedStatement
- Overrides:
executeQuery
in classFBPreparedStatement
- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdate
in interfacePreparedStatement
- Overrides:
executeUpdate
in classFBPreparedStatement
- Throws:
SQLException
-
internalExecute
Description copied from class:FBPreparedStatement
Execute this statement. Method checks whether all parameters are set, flushes all "flushable" fields that might contain cached data and executes the statement.- Overrides:
internalExecute
in classFBPreparedStatement
- Parameters:
sendOutParams
- Determines if the XSQLDA structure should be sent to the database- Returns:
true
if the statement has more result sets.- Throws:
SQLException
-
createSpecialResultSet
protected FBResultSet createSpecialResultSet(@Nullable FBObjectListener.ResultSetListener resultSetListener) throws SQLException Description copied from class:FBStatement
Create the result set forspecialResult
.Should only be called from
FBStatement.getResultSet(boolean)
. This exists becauseFBCallableStatement
needs to create the result set in a slightly different way to account for the fact that the blobs were already cached earlier.- Overrides:
createSpecialResultSet
in classFBStatement
- Parameters:
resultSetListener
- result set listener (can benull
)- Returns:
- result set wrapping
specialResult
- Throws:
SQLException
-
registerOutParameter
- Specified by:
registerOutParameter
in interfaceCallableStatement
- Throws:
SQLException
-
registerOutParameter
Implementation note: This method will behave the same as calling
registerOutParameter(int, int)
.- Specified by:
registerOutParameter
in interfaceCallableStatement
- Throws:
SQLException
-
registerOutParameter
Implementation note: behaves as
registerOutParameter(int, int)
called withSQLType.getVendorTypeNumber()
.- Specified by:
registerOutParameter
in interfaceCallableStatement
- Throws:
SQLException
-
registerOutParameter
public void registerOutParameter(int parameterIndex, SQLType sqlType, int scale) throws SQLException Implementation note: behaves as
registerOutParameter(int, int, int)
called withSQLType.getVendorTypeNumber()
.- Specified by:
registerOutParameter
in interfaceCallableStatement
- Throws:
SQLException
-
registerOutParameter
public void registerOutParameter(int parameterIndex, SQLType sqlType, String typeName) throws SQLException Implementation note: behaves as
registerOutParameter(int, int, String)
called withSQLType.getVendorTypeNumber()
.- Specified by:
registerOutParameter
in interfaceCallableStatement
- Throws:
SQLException
-
wasNull
- Specified by:
wasNull
in interfaceCallableStatement
- Throws:
SQLException
-
getString
- Specified by:
getString
in interfaceCallableStatement
- Throws:
SQLException
-
getBoolean
- Specified by:
getBoolean
in interfaceCallableStatement
- Throws:
SQLException
-
getByte
- Specified by:
getByte
in interfaceCallableStatement
- Throws:
SQLException
-
getShort
- Specified by:
getShort
in interfaceCallableStatement
- Throws:
SQLException
-
getInt
- Specified by:
getInt
in interfaceCallableStatement
- Throws:
SQLException
-
getLong
- Specified by:
getLong
in interfaceCallableStatement
- Throws:
SQLException
-
getFloat
- Specified by:
getFloat
in interfaceCallableStatement
- Throws:
SQLException
-
getDouble
- Specified by:
getDouble
in interfaceCallableStatement
- Throws:
SQLException
-
getBigDecimal
@Deprecated(since="1") public @Nullable BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException Deprecated.- Specified by:
getBigDecimal
in interfaceCallableStatement
- Throws:
SQLException
-
getBytes
- Specified by:
getBytes
in interfaceCallableStatement
- Throws:
SQLException
-
getDate
- Specified by:
getDate
in interfaceCallableStatement
- Throws:
SQLException
-
getTime
- Specified by:
getTime
in interfaceCallableStatement
- Throws:
SQLException
-
getTimestamp
- Specified by:
getTimestamp
in interfaceCallableStatement
- Throws:
SQLException
-
getObject
Implementation note: the registered type is ignored, and the type derived from the actual datatype will be used.
- Specified by:
getObject
in interfaceCallableStatement
- Throws:
SQLException
-
getObject
- Specified by:
getObject
in interfaceCallableStatement
- Throws:
SQLException
-
getObject
Implementation note: the registered type is ignored, and the type derived from the actual datatype will be used.
- Specified by:
getObject
in interfaceCallableStatement
- Throws:
SQLException
-
getObject
Implementation note: the registered type is ignored, and the type derived from the actual datatype will be used.
- Specified by:
getObject
in interfaceCallableStatement
- Throws:
SQLException
-
getObject
public <T extends @Nullable Object> @Nullable T getObject(int parameterIndex, Class<T> type) throws SQLException - Specified by:
getObject
in interfaceCallableStatement
- Throws:
SQLException
-
getObject
public <T extends @Nullable Object> @Nullable T getObject(String parameterName, Class<T> type) throws SQLException - Specified by:
getObject
in interfaceCallableStatement
- Throws:
SQLException
-
getBigDecimal
- Specified by:
getBigDecimal
in interfaceCallableStatement
- Throws:
SQLException
-
getRef
- Specified by:
getRef
in interfaceCallableStatement
- Throws:
SQLException
-
getBlob
- Specified by:
getBlob
in interfaceCallableStatement
- Throws:
SQLException
-
getClob
- Specified by:
getClob
in interfaceCallableStatement
- Throws:
SQLException
-
getArray
- Specified by:
getArray
in interfaceCallableStatement
- Throws:
SQLException
-
getDate
- Specified by:
getDate
in interfaceCallableStatement
- Throws:
SQLException
-
getTime
- Specified by:
getTime
in interfaceCallableStatement
- Throws:
SQLException
-
getTimestamp
public @Nullable Timestamp getTimestamp(int parameterIndex, @Nullable Calendar cal) throws SQLException - Specified by:
getTimestamp
in interfaceCallableStatement
- Throws:
SQLException
-
getURL
- Specified by:
getURL
in interfaceCallableStatement
- Throws:
SQLException
-
getString
- Specified by:
getString
in interfaceCallableStatement
- Throws:
SQLException
-
getBoolean
- Specified by:
getBoolean
in interfaceCallableStatement
- Throws:
SQLException
-
getByte
- Specified by:
getByte
in interfaceCallableStatement
- Throws:
SQLException
-
getShort
- Specified by:
getShort
in interfaceCallableStatement
- Throws:
SQLException
-
getInt
- Specified by:
getInt
in interfaceCallableStatement
- Throws:
SQLException
-
getLong
- Specified by:
getLong
in interfaceCallableStatement
- Throws:
SQLException
-
getFloat
- Specified by:
getFloat
in interfaceCallableStatement
- Throws:
SQLException
-
getDouble
- Specified by:
getDouble
in interfaceCallableStatement
- Throws:
SQLException
-
getBytes
- Specified by:
getBytes
in interfaceCallableStatement
- Throws:
SQLException
-
getDate
- Specified by:
getDate
in interfaceCallableStatement
- Throws:
SQLException
-
getTime
- Specified by:
getTime
in interfaceCallableStatement
- Throws:
SQLException
-
getTimestamp
- Specified by:
getTimestamp
in interfaceCallableStatement
- Throws:
SQLException
-
getBigDecimal
- Specified by:
getBigDecimal
in interfaceCallableStatement
- Throws:
SQLException
-
getRef
- Specified by:
getRef
in interfaceCallableStatement
- Throws:
SQLException
-
getBlob
- Specified by:
getBlob
in interfaceCallableStatement
- Throws:
SQLException
-
getClob
- Specified by:
getClob
in interfaceCallableStatement
- Throws:
SQLException
-
getArray
- Specified by:
getArray
in interfaceCallableStatement
- Throws:
SQLException
-
getDate
- Specified by:
getDate
in interfaceCallableStatement
- Throws:
SQLException
-
getTime
- Specified by:
getTime
in interfaceCallableStatement
- Throws:
SQLException
-
getTimestamp
- Specified by:
getTimestamp
in interfaceCallableStatement
- Throws:
SQLException
-
getURL
- Specified by:
getURL
in interfaceCallableStatement
- Throws:
SQLException
-
getCharacterStream
- Specified by:
getCharacterStream
in interfaceCallableStatement
- Throws:
SQLException
-
getCharacterStream
- Specified by:
getCharacterStream
in interfaceCallableStatement
- Throws:
SQLException
-
getNCharacterStream
Implementation note: This method behaves exactly the same as
getCharacterStream(int)
.- Specified by:
getNCharacterStream
in interfaceCallableStatement
- Throws:
SQLException
-
getNCharacterStream
Implementation note: This method behaves exactly the same as
getCharacterStream(String)
.- Specified by:
getNCharacterStream
in interfaceCallableStatement
- Throws:
SQLException
-
getNString
Implementation note: This method behaves exactly the same as
getString(int)
.- Specified by:
getNString
in interfaceCallableStatement
- Throws:
SQLException
-
getNString
Implementation note: This method behaves exactly the same as
getString(String)
.- Specified by:
getNString
in interfaceCallableStatement
- Throws:
SQLException
-
setAsciiStream
public void setAsciiStream(String parameterName, @Nullable InputStream x, long length) throws SQLException - Specified by:
setAsciiStream
in interfaceCallableStatement
- Throws:
SQLException
-
setAsciiStream
- Specified by:
setAsciiStream
in interfaceCallableStatement
- Throws:
SQLException
-
setBinaryStream
public void setBinaryStream(String parameterName, @Nullable InputStream x, long length) throws SQLException - Specified by:
setBinaryStream
in interfaceCallableStatement
- Throws:
SQLException
-
setBinaryStream
- Specified by:
setBinaryStream
in interfaceCallableStatement
- Throws:
SQLException
-
setBlob
- Specified by:
setBlob
in interfaceCallableStatement
- Throws:
SQLException
-
setBlob
public void setBlob(String parameterName, @Nullable InputStream inputStream, long length) throws SQLException - Specified by:
setBlob
in interfaceCallableStatement
- Throws:
SQLException
-
setBlob
- Specified by:
setBlob
in interfaceCallableStatement
- Throws:
SQLException
-
setCharacterStream
public void setCharacterStream(String parameterName, @Nullable Reader reader, long length) throws SQLException - Specified by:
setCharacterStream
in interfaceCallableStatement
- Throws:
SQLException
-
setCharacterStream
- Specified by:
setCharacterStream
in interfaceCallableStatement
- Throws:
SQLException
-
setClob
- Specified by:
setClob
in interfaceCallableStatement
- Throws:
SQLException
-
setClob
- Specified by:
setClob
in interfaceCallableStatement
- Throws:
SQLException
-
setClob
- Specified by:
setClob
in interfaceCallableStatement
- Throws:
SQLException
-
setNCharacterStream
public void setNCharacterStream(String parameterName, @Nullable Reader value, long length) throws SQLException Implementation note: This method behaves exactly the same as
setCharacterStream(String, Reader, long)
.- Specified by:
setNCharacterStream
in interfaceCallableStatement
- Throws:
SQLException
-
setNCharacterStream
Implementation note: This method behaves exactly the same as
setCharacterStream(String, Reader)
.- Specified by:
setNCharacterStream
in interfaceCallableStatement
- Throws:
SQLException
-
setNClob
public void setNClob(String parameterName, @Nullable Reader reader, long length) throws SQLException Implementation note: This method behaves exactly the same as
setClob(String, Reader, long)
.- Specified by:
setNClob
in interfaceCallableStatement
- Throws:
SQLException
-
setNClob
Implementation note: This method behaves exactly the same as
setClob(String, Reader)
.- Specified by:
setNClob
in interfaceCallableStatement
- Throws:
SQLException
-
setNString
Implementation note: This method behaves exactly the same as
setString(String, String)
.- Specified by:
setNString
in interfaceCallableStatement
- Throws:
SQLException
-
registerOutParameter
- Specified by:
registerOutParameter
in interfaceCallableStatement
- Throws:
SQLException
-
registerOutParameter
- Specified by:
registerOutParameter
in interfaceCallableStatement
- Throws:
SQLException
-
registerOutParameter
- Specified by:
registerOutParameter
in interfaceCallableStatement
- Throws:
SQLException
-
registerOutParameter
Implementation note: behaves as
registerOutParameter(String, int)
called withSQLType.getVendorTypeNumber()
.- Specified by:
registerOutParameter
in interfaceCallableStatement
- Throws:
SQLException
-
registerOutParameter
public void registerOutParameter(String parameterName, SQLType sqlType, int scale) throws SQLException Implementation note: behaves as
registerOutParameter(String, int, int)
called withSQLType.getVendorTypeNumber()
.- Specified by:
registerOutParameter
in interfaceCallableStatement
- Throws:
SQLException
-
registerOutParameter
public void registerOutParameter(String parameterName, SQLType sqlType, String typeName) throws SQLException Implementation note: behaves as
registerOutParameter(String, int, String)
called withSQLType.getVendorTypeNumber()
.- Specified by:
registerOutParameter
in interfaceCallableStatement
- Throws:
SQLException
-
setURL
- Specified by:
setURL
in interfaceCallableStatement
- Throws:
SQLException
-
setNull
- Specified by:
setNull
in interfaceCallableStatement
- Throws:
SQLException
-
setBoolean
- Specified by:
setBoolean
in interfaceCallableStatement
- Throws:
SQLException
-
setByte
- Specified by:
setByte
in interfaceCallableStatement
- Throws:
SQLException
-
setShort
- Specified by:
setShort
in interfaceCallableStatement
- Throws:
SQLException
-
setInt
- Specified by:
setInt
in interfaceCallableStatement
- Throws:
SQLException
-
setLong
- Specified by:
setLong
in interfaceCallableStatement
- Throws:
SQLException
-
setFloat
- Specified by:
setFloat
in interfaceCallableStatement
- Throws:
SQLException
-
setDouble
- Specified by:
setDouble
in interfaceCallableStatement
- Throws:
SQLException
-
setBigDecimal
- Specified by:
setBigDecimal
in interfaceCallableStatement
- Throws:
SQLException
-
setString
- Specified by:
setString
in interfaceCallableStatement
- Throws:
SQLException
-
setBytes
- Specified by:
setBytes
in interfaceCallableStatement
- Throws:
SQLException
-
setDate
- Specified by:
setDate
in interfaceCallableStatement
- Throws:
SQLException
-
setTime
- Specified by:
setTime
in interfaceCallableStatement
- Throws:
SQLException
-
setTimestamp
- Specified by:
setTimestamp
in interfaceCallableStatement
- Throws:
SQLException
-
setAsciiStream
public void setAsciiStream(String param1, @Nullable InputStream param2, int param3) throws SQLException - Specified by:
setAsciiStream
in interfaceCallableStatement
- Throws:
SQLException
-
setBinaryStream
public void setBinaryStream(String param1, @Nullable InputStream param2, int param3) throws SQLException - Specified by:
setBinaryStream
in interfaceCallableStatement
- Throws:
SQLException
-
setObject
public void setObject(String param1, @Nullable Object param2, int param3, int param4) throws SQLException - Specified by:
setObject
in interfaceCallableStatement
- Throws:
SQLException
-
setObject
- Specified by:
setObject
in interfaceCallableStatement
- Throws:
SQLException
-
setObject
- Specified by:
setObject
in interfaceCallableStatement
- Throws:
SQLException
-
setCharacterStream
public void setCharacterStream(String param1, @Nullable Reader param2, int param3) throws SQLException - Specified by:
setCharacterStream
in interfaceCallableStatement
- Throws:
SQLException
-
setDate
public void setDate(String param1, @Nullable Date param2, @Nullable Calendar param3) throws SQLException - Specified by:
setDate
in interfaceCallableStatement
- Throws:
SQLException
-
setTime
public void setTime(String param1, @Nullable Time param2, @Nullable Calendar param3) throws SQLException - Specified by:
setTime
in interfaceCallableStatement
- Throws:
SQLException
-
setTimestamp
public void setTimestamp(String param1, @Nullable Timestamp param2, @Nullable Calendar param3) throws SQLException - Specified by:
setTimestamp
in interfaceCallableStatement
- Throws:
SQLException
-
setNull
- Specified by:
setNull
in interfaceCallableStatement
- Throws:
SQLException
-
registerOutParameter
public void registerOutParameter(int parameterIndex, int sqlType, String typeName) throws SQLException - Specified by:
registerOutParameter
in interfaceCallableStatement
- Throws:
SQLException
-
getGeneratedKeys
- Specified by:
getGeneratedKeys
in interfaceStatement
- Overrides:
getGeneratedKeys
in classFBStatement
- Throws:
SQLException
-
assertHasData
Asserts if the current statement has data to return. It checks if the result set has a row with data.- Parameters:
rs
- result set to test- Returns:
- non-
null
result set (same object asrs
) - Throws:
SQLException
- when the result set has no data.
-
getAndAssertSingletonResultSet
Returns the result set for the singleton row of the callable statement and asserts it has data. If this is a selectable procedure, or there is no singleton row, it will return the normal result set.This should fix the problem described in JDBC-350 in most circumstances.
- Returns:
- Either the singleton result set, or the current result set as described above
- Throws:
SQLException
- For database access errors
-
setBigDecimal
- Specified by:
setBigDecimal
in interfacePreparedStatement
- Overrides:
setBigDecimal
in classFBPreparedStatement
- Throws:
SQLException
-
setBinaryStream
public void setBinaryStream(int parameterIndex, @Nullable InputStream inputStream, int length) throws SQLException - Specified by:
setBinaryStream
in interfacePreparedStatement
- Overrides:
setBinaryStream
in classFBPreparedStatement
- Throws:
SQLException
-
setBinaryStream
public void setBinaryStream(int parameterIndex, @Nullable InputStream inputStream, long length) throws SQLException - Specified by:
setBinaryStream
in interfacePreparedStatement
- Overrides:
setBinaryStream
in classFBPreparedStatement
- Throws:
SQLException
-
setBinaryStream
public void setBinaryStream(int parameterIndex, @Nullable InputStream inputStream) throws SQLException - Specified by:
setBinaryStream
in interfacePreparedStatement
- Overrides:
setBinaryStream
in classFBPreparedStatement
- Throws:
SQLException
-
setBlob
- Specified by:
setBlob
in interfacePreparedStatement
- Overrides:
setBlob
in classFBPreparedStatement
- Throws:
SQLException
-
setBlob
public void setBlob(int parameterIndex, @Nullable InputStream inputStream, long length) throws SQLException - Specified by:
setBlob
in interfacePreparedStatement
- Overrides:
setBlob
in classFBPreparedStatement
- Throws:
SQLException
-
setBlob
- Specified by:
setBlob
in interfacePreparedStatement
- Overrides:
setBlob
in classFBPreparedStatement
- Throws:
SQLException
-
setBoolean
- Specified by:
setBoolean
in interfacePreparedStatement
- Overrides:
setBoolean
in classFBPreparedStatement
- Throws:
SQLException
-
setByte
- Specified by:
setByte
in interfacePreparedStatement
- Overrides:
setByte
in classFBPreparedStatement
- Throws:
SQLException
-
setBytes
- Specified by:
setBytes
in interfacePreparedStatement
- Overrides:
setBytes
in classFBPreparedStatement
- Throws:
SQLException
-
setCharacterStream
public void setCharacterStream(int parameterIndex, @Nullable Reader reader, int length) throws SQLException - Specified by:
setCharacterStream
in interfacePreparedStatement
- Overrides:
setCharacterStream
in classFBPreparedStatement
- Throws:
SQLException
-
setCharacterStream
public void setCharacterStream(int parameterIndex, @Nullable Reader reader, long length) throws SQLException - Specified by:
setCharacterStream
in interfacePreparedStatement
- Overrides:
setCharacterStream
in classFBPreparedStatement
- Throws:
SQLException
-
setCharacterStream
- Specified by:
setCharacterStream
in interfacePreparedStatement
- Overrides:
setCharacterStream
in classFBPreparedStatement
- Throws:
SQLException
-
setClob
- Specified by:
setClob
in interfacePreparedStatement
- Overrides:
setClob
in classFBPreparedStatement
- Throws:
SQLException
-
setClob
- Specified by:
setClob
in interfacePreparedStatement
- Overrides:
setClob
in classFBPreparedStatement
- Throws:
SQLException
-
setClob
- Specified by:
setClob
in interfacePreparedStatement
- Overrides:
setClob
in classFBPreparedStatement
- Throws:
SQLException
-
setDate
public void setDate(int parameterIndex, @Nullable Date x, @Nullable Calendar cal) throws SQLException - Specified by:
setDate
in interfacePreparedStatement
- Overrides:
setDate
in classFBPreparedStatement
- Throws:
SQLException
-
setDate
- Specified by:
setDate
in interfacePreparedStatement
- Overrides:
setDate
in classFBPreparedStatement
- Throws:
SQLException
-
setDouble
- Specified by:
setDouble
in interfacePreparedStatement
- Overrides:
setDouble
in classFBPreparedStatement
- Throws:
SQLException
-
setFloat
- Specified by:
setFloat
in interfacePreparedStatement
- Overrides:
setFloat
in classFBPreparedStatement
- Throws:
SQLException
-
setInt
- Specified by:
setInt
in interfacePreparedStatement
- Overrides:
setInt
in classFBPreparedStatement
- Throws:
SQLException
-
setLong
- Specified by:
setLong
in interfacePreparedStatement
- Overrides:
setLong
in classFBPreparedStatement
- Throws:
SQLException
-
setNull
- Specified by:
setNull
in interfacePreparedStatement
- Overrides:
setNull
in classFBPreparedStatement
- Throws:
SQLException
-
setNull
- Specified by:
setNull
in interfacePreparedStatement
- Overrides:
setNull
in classFBPreparedStatement
- Throws:
SQLException
-
setObject
public void setObject(int parameterIndex, @Nullable Object x, int targetSqlType, int scaleOrLength) throws SQLException Implementation note: ignores
scaleOrLength
andtargetSqlType
and works asFBPreparedStatement.setObject(int, Object)
,scaleOrLength
is not ignored ifx
is aReader
orInputStream
.Implementation note: ignores
scaleOrLength
andtargetSqlType
and works assetObject(int, Object)
,scaleOrLength
is not ignored ifx
is aReader
orInputStream
.- Specified by:
setObject
in interfacePreparedStatement
- Overrides:
setObject
in classFBPreparedStatement
- Throws:
SQLException
-
setObject
public void setObject(int parameterIndex, @Nullable Object x, int targetSqlType) throws SQLException Description copied from class:FBPreparedStatement
Implementation note: ignores
targetSqlType
and works asFBPreparedStatement.setObject(int, Object)
.- Specified by:
setObject
in interfacePreparedStatement
- Overrides:
setObject
in classFBPreparedStatement
- Throws:
SQLException
-
setObject
- Specified by:
setObject
in interfacePreparedStatement
- Overrides:
setObject
in classFBPreparedStatement
- Throws:
SQLException
-
setShort
- Specified by:
setShort
in interfacePreparedStatement
- Overrides:
setShort
in classFBPreparedStatement
- Throws:
SQLException
-
setString
- Specified by:
setString
in interfacePreparedStatement
- Overrides:
setString
in classFBPreparedStatement
- Throws:
SQLException
-
setTime
public void setTime(int parameterIndex, @Nullable Time x, @Nullable Calendar cal) throws SQLException - Specified by:
setTime
in interfacePreparedStatement
- Overrides:
setTime
in classFBPreparedStatement
- Throws:
SQLException
-
setTime
- Specified by:
setTime
in interfacePreparedStatement
- Overrides:
setTime
in classFBPreparedStatement
- Throws:
SQLException
-
setTimestamp
public void setTimestamp(int parameterIndex, @Nullable Timestamp x, @Nullable Calendar cal) throws SQLException - Specified by:
setTimestamp
in interfacePreparedStatement
- Overrides:
setTimestamp
in classFBPreparedStatement
- Throws:
SQLException
-
setTimestamp
- Specified by:
setTimestamp
in interfacePreparedStatement
- Overrides:
setTimestamp
in classFBPreparedStatement
- Throws:
SQLException
-
getNClob
Implementation note: This method behaves exactly the same as
getClob(int)
.- Specified by:
getNClob
in interfaceCallableStatement
- Throws:
SQLException
-
getNClob
Implementation note: This method behaves exactly the same as
getClob(String)
.- Specified by:
getNClob
in interfaceCallableStatement
- Throws:
SQLException
-
getRowId
- Specified by:
getRowId
in interfaceCallableStatement
- Throws:
SQLException
-
getRowId
- Specified by:
getRowId
in interfaceCallableStatement
- Throws:
SQLException
-
getSQLXML
- Specified by:
getSQLXML
in interfaceCallableStatement
- Throws:
SQLException
-
getSQLXML
- Specified by:
getSQLXML
in interfaceCallableStatement
- Throws:
SQLException
-
setNClob
Implementation note: This method behaves exactly the same as
setClob(String, Clob)
.- Specified by:
setNClob
in interfaceCallableStatement
- Throws:
SQLException
-
setRowId
- Specified by:
setRowId
in interfaceCallableStatement
- Throws:
SQLException
-
setSQLXML
- Specified by:
setSQLXML
in interfaceCallableStatement
- Throws:
SQLException
-