Class FBPreparedStatement
- java.lang.Object
-
- org.firebirdsql.jdbc.FBStatement
-
- org.firebirdsql.jdbc.FBPreparedStatement
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.sql.PreparedStatement
,java.sql.Statement
,java.sql.Wrapper
,FirebirdPreparedStatement
,FirebirdStatement
- Direct Known Subclasses:
FBCallableStatement
public class FBPreparedStatement extends FBStatement implements FirebirdPreparedStatement
Implementation ofPreparedStatement
.- Author:
- David Jencks, Roman Rokytskyy, Mark Rotteveel
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.firebirdsql.jdbc.FBStatement
FBStatement.StatementResult
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
METHOD_NOT_SUPPORTED
-
Fields inherited from class org.firebirdsql.jdbc.FBStatement
connection, currentStatementResult, fbStatement, fetchSize, firstWarning, gdsHelper, isSingletonResult, maxRows, specialResult, statementListener
-
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_SELECT, TYPE_SELECT_FOR_UPDATE, TYPE_SET_GENERATOR, TYPE_START_TRANS, TYPE_UPDATE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FBPreparedStatement(GDSHelper c, int rsType, int rsConcurrency, int rsHoldability, FBObjectListener.StatementListener statementListener, FBObjectListener.BlobListener blobListener)
Create instance of this class for the specified result set type and concurrency.protected
FBPreparedStatement(GDSHelper c, java.lang.String sql, int rsType, int rsConcurrency, int rsHoldability, FBObjectListener.StatementListener statementListener, FBObjectListener.BlobListener blobListener, boolean metaDataQuery, boolean standaloneStatement, boolean generatedKeys)
Create instance of this class and prepare SQL statement.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addBatch()
void
addBatch(java.lang.String sql)
void
clearBatch()
void
clearParameters()
void
completeStatement(CompletionReason reason)
boolean
execute()
boolean
execute(java.lang.String sql)
boolean
execute(java.lang.String sql, int autoGeneratedKeys)
boolean
execute(java.lang.String sql, int[] columnIndexes)
boolean
execute(java.lang.String sql, java.lang.String[] columnNames)
protected java.util.List<java.lang.Long>
executeBatchInternal()
long
executeLargeUpdate()
java.sql.ResultSet
executeQuery()
java.sql.ResultSet
executeQuery(java.lang.String sql)
int
executeUpdate()
int
executeUpdate(java.lang.String sql)
int
executeUpdate(java.lang.String sql, int autoGeneratedKeys)
int
executeUpdate(java.lang.String sql, int[] columnIndex)
int
executeUpdate(java.lang.String sql, java.lang.String[] columnNames)
java.lang.String
getExecutionPlan()
Get the execution plan of this PreparedStatementjava.lang.String
getExplainedExecutionPlan()
Get the detailed execution plan of this PreparedStatementprotected FBField
getField(int columnIndex)
Factory method for the field access objectsFirebirdParameterMetaData
getFirebirdParameterMetaData()
java.sql.ResultSetMetaData
getMetaData()
protected FieldDescriptor
getParameterDescriptor(int columnIndex)
Returns theFieldDescriptor
of the specified parameter.java.sql.ParameterMetaData
getParameterMetaData()
int
getStatementType()
Get the statement type of this PreparedStatement.protected boolean
internalExecute(boolean sendOutParams)
Execute this statement.protected boolean
isGeneratedKeyQuery()
protected boolean
needsScrollableCursorEnabled()
protected void
notifyStatementCompleted(boolean success)
Notifies statement completion.protected void
prepareFixedStatement(java.lang.String sql)
Prepare fixed statement and initialize parameters.void
setArray(int i, java.sql.Array x)
void
setAsciiStream(int parameterIndex, java.io.InputStream x)
void
setAsciiStream(int parameterIndex, java.io.InputStream x, int length)
void
setAsciiStream(int parameterIndex, java.io.InputStream x, long length)
void
setBigDecimal(int parameterIndex, java.math.BigDecimal x)
void
setBinaryStream(int parameterIndex, java.io.InputStream inputStream)
void
setBinaryStream(int parameterIndex, java.io.InputStream inputStream, int length)
void
setBinaryStream(int parameterIndex, java.io.InputStream inputStream, long length)
void
setBlob(int parameterIndex, java.io.InputStream inputStream)
void
setBlob(int parameterIndex, java.io.InputStream inputStream, long length)
void
setBlob(int parameterIndex, java.sql.Blob blob)
void
setBoolean(int parameterIndex, boolean x)
void
setByte(int parameterIndex, byte x)
void
setBytes(int parameterIndex, byte[] x)
void
setCharacterStream(int parameterIndex, java.io.Reader reader)
void
setCharacterStream(int parameterIndex, java.io.Reader reader, int length)
void
setCharacterStream(int parameterIndex, java.io.Reader reader, long length)
void
setClob(int parameterIndex, java.io.Reader reader)
void
setClob(int parameterIndex, java.io.Reader reader, long length)
void
setClob(int parameterIndex, java.sql.Clob clob)
void
setDate(int parameterIndex, java.sql.Date x)
void
setDate(int parameterIndex, java.sql.Date x, java.util.Calendar cal)
void
setDouble(int parameterIndex, double x)
void
setFloat(int parameterIndex, float x)
void
setInt(int parameterIndex, int x)
void
setLong(int parameterIndex, long x)
void
setNCharacterStream(int parameterIndex, java.io.Reader value)
void
setNCharacterStream(int parameterIndex, java.io.Reader value, long length)
void
setNClob(int parameterIndex, java.io.Reader reader)
void
setNClob(int parameterIndex, java.io.Reader reader, long length)
void
setNClob(int parameterIndex, java.sql.NClob value)
void
setNString(int parameterIndex, java.lang.String value)
void
setNull(int parameterIndex, int sqlType)
void
setNull(int parameterIndex, int sqlType, java.lang.String typeName)
void
setObject(int parameterIndex, java.lang.Object x)
void
setObject(int parameterIndex, java.lang.Object x, int targetSqlType)
void
setObject(int parameterIndex, java.lang.Object x, int targetSqlType, int scale)
void
setObject(int parameterIndex, java.lang.Object x, java.sql.SQLType targetSqlType)
void
setObject(int parameterIndex, java.lang.Object x, java.sql.SQLType targetSqlType, int scaleOrLength)
void
setRef(int i, java.sql.Ref x)
void
setRowId(int parameterIndex, java.sql.RowId x)
void
setShort(int parameterIndex, short x)
void
setSQLXML(int parameterIndex, java.sql.SQLXML xmlObject)
void
setString(int parameterIndex, java.lang.String x)
void
setTime(int parameterIndex, java.sql.Time x)
void
setTime(int parameterIndex, java.sql.Time x, java.util.Calendar cal)
void
setTimestamp(int parameterIndex, java.sql.Timestamp x)
void
setTimestamp(int parameterIndex, java.sql.Timestamp x, java.util.Calendar cal)
void
setUnicodeStream(int parameterIndex, java.io.InputStream x, int length)
Deprecated.void
setURL(int parameterIndex, java.net.URL url)
-
Methods inherited from class org.firebirdsql.jdbc.FBStatement
addWarning, cancel, checkValidity, clearWarnings, close, closeOnCompletion, completeStatement, createBatchUpdateException, createBatchUpdateException, createSpecialResultSet, createStatementListener, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, equals, executeBatch, executeImpl, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getConnection, getCurrentResultSet, getDeletedRowsCount, getFetchDirection, getFetchSize, getGeneratedKeys, getInsertedRowsCount, getLargeMaxRows, getLargeUpdateCount, getLargeUpdateCountMinZero, getLastExecutionPlan, getLastExplainedExecutionPlan, getLocalStatementId, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getUpdateCountMinZero, getUpdatedRowsCount, getWarnings, hashCode, hasOpenResultSet, internalExecute, internalExecute, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, isValid, isWrapperFor, nativeSQL, notifyStatementCompleted, notifyStatementStarted, notifyStatementStarted, requireStatement, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, unwrap, withLock
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.firebirdsql.jdbc.FirebirdStatement
getCurrentResultSet, getDeletedRowsCount, getInsertedRowsCount, getLastExecutionPlan, getLastExplainedExecutionPlan, getLocalStatementId, getUpdatedRowsCount, hasOpenResultSet, isValid
-
Methods inherited from interface java.sql.Statement
cancel, clearWarnings, close, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, 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
-
-
-
-
Field Detail
-
METHOD_NOT_SUPPORTED
public static final java.lang.String METHOD_NOT_SUPPORTED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FBPreparedStatement
protected FBPreparedStatement(GDSHelper c, int rsType, int rsConcurrency, int rsHoldability, FBObjectListener.StatementListener statementListener, FBObjectListener.BlobListener blobListener) throws java.sql.SQLException
Create instance of this class for the specified result set type and concurrency. This constructor is used only inFBCallableStatement
since the statement is prepared right before the execution.- Parameters:
c
- instance ofGDSHelper
that will be used to perform all database activities.rsType
- desired result set type.rsConcurrency
- desired result set concurrency.statementListener
- statement listener that will be notified about the statement start, close and completion.- Throws:
java.sql.SQLException
- if something went wrong.
-
FBPreparedStatement
protected FBPreparedStatement(GDSHelper c, java.lang.String sql, int rsType, int rsConcurrency, int rsHoldability, FBObjectListener.StatementListener statementListener, FBObjectListener.BlobListener blobListener, boolean metaDataQuery, boolean standaloneStatement, boolean generatedKeys) throws java.sql.SQLException
Create instance of this class and prepare SQL statement.- Parameters:
c
- connection to be used.sql
- SQL statement to prepare.rsType
- type of result set to create.rsConcurrency
- result set concurrency.- Throws:
java.sql.SQLException
- if something went wrong.
-
-
Method Detail
-
completeStatement
public void completeStatement(CompletionReason reason) throws java.sql.SQLException
- Overrides:
completeStatement
in classFBStatement
- Throws:
java.sql.SQLException
-
notifyStatementCompleted
protected void notifyStatementCompleted(boolean success) throws java.sql.SQLException
Description copied from class:FBStatement
Notifies statement completion.Use of
success = false
should not be generally used for failing execution. The only difference betweentrue
andfalse
is whether completion triggers commit or rollback in auto-commit mode, and in general, even for failed execution, a commit should be triggered. The only exception is for batch execution in auto-commit, where we rollback if one statement failed (and this behaviour is specified by JDBC as implementation-specific), and ending a transaction if statement preparation failed inFBPreparedStatement
.- Overrides:
notifyStatementCompleted
in classFBStatement
- Parameters:
success
-true
notify successful completion,false
for unsuccessful completion- Throws:
java.sql.SQLException
- exception from handling statement completion (e.g. commit or rollback in auto-commit)
-
needsScrollableCursorEnabled
protected boolean needsScrollableCursorEnabled()
- Overrides:
needsScrollableCursorEnabled
in classFBStatement
-
executeQuery
public java.sql.ResultSet executeQuery() throws java.sql.SQLException
- Specified by:
executeQuery
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate() throws java.sql.SQLException
- Specified by:
executeUpdate
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
getFirebirdParameterMetaData
public FirebirdParameterMetaData getFirebirdParameterMetaData() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
setNull
public void setNull(int parameterIndex, int sqlType) throws java.sql.SQLException
- Specified by:
setNull
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setBinaryStream
public void setBinaryStream(int parameterIndex, java.io.InputStream inputStream, int length) throws java.sql.SQLException
- Specified by:
setBinaryStream
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setBinaryStream
public void setBinaryStream(int parameterIndex, java.io.InputStream inputStream, long length) throws java.sql.SQLException
- Specified by:
setBinaryStream
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setBinaryStream
public void setBinaryStream(int parameterIndex, java.io.InputStream inputStream) throws java.sql.SQLException
- Specified by:
setBinaryStream
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setBytes
public void setBytes(int parameterIndex, byte[] x) throws java.sql.SQLException
- Specified by:
setBytes
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setBoolean
public void setBoolean(int parameterIndex, boolean x) throws java.sql.SQLException
- Specified by:
setBoolean
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setByte
public void setByte(int parameterIndex, byte x) throws java.sql.SQLException
- Specified by:
setByte
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setDate
public void setDate(int parameterIndex, java.sql.Date x) throws java.sql.SQLException
- Specified by:
setDate
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setDouble
public void setDouble(int parameterIndex, double x) throws java.sql.SQLException
- Specified by:
setDouble
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setFloat
public void setFloat(int parameterIndex, float x) throws java.sql.SQLException
- Specified by:
setFloat
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setInt
public void setInt(int parameterIndex, int x) throws java.sql.SQLException
- Specified by:
setInt
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setLong
public void setLong(int parameterIndex, long x) throws java.sql.SQLException
- Specified by:
setLong
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setObject
public void setObject(int parameterIndex, java.lang.Object x) throws java.sql.SQLException
- Specified by:
setObject
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setObject
public void setObject(int parameterIndex, java.lang.Object x, java.sql.SQLType targetSqlType, int scaleOrLength) throws java.sql.SQLException
Implementation note: behaves as
setObject(int, Object, int, int)
called withSQLType.getVendorTypeNumber()
.- Specified by:
setObject
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setObject
public void setObject(int parameterIndex, java.lang.Object x, java.sql.SQLType targetSqlType) throws java.sql.SQLException
Implementation note: behaves as
setObject(int, Object, int)
called withSQLType.getVendorTypeNumber()
.- Specified by:
setObject
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setShort
public void setShort(int parameterIndex, short x) throws java.sql.SQLException
- Specified by:
setShort
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setString
public void setString(int parameterIndex, java.lang.String x) throws java.sql.SQLException
- Specified by:
setString
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setTime
public void setTime(int parameterIndex, java.sql.Time x) throws java.sql.SQLException
- Specified by:
setTime
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setTimestamp
public void setTimestamp(int parameterIndex, java.sql.Timestamp x) throws java.sql.SQLException
- Specified by:
setTimestamp
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setBigDecimal
public void setBigDecimal(int parameterIndex, java.math.BigDecimal x) throws java.sql.SQLException
- Specified by:
setBigDecimal
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
getParameterDescriptor
protected FieldDescriptor getParameterDescriptor(int columnIndex)
Returns theFieldDescriptor
of the specified parameter.- Parameters:
columnIndex
- 1-based index of the parameter- Returns:
- Field descriptor
-
getField
protected FBField getField(int columnIndex) throws java.sql.SQLException
Factory method for the field access objects- Throws:
java.sql.SQLException
-
setAsciiStream
public final void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException
Implementation note: works identical to
setBinaryStream(int, InputStream, int)
.- Specified by:
setAsciiStream
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setAsciiStream
public final void setAsciiStream(int parameterIndex, java.io.InputStream x, long length) throws java.sql.SQLException
Implementation note: works identical to
setBinaryStream(int, InputStream, long)
.- Specified by:
setAsciiStream
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setAsciiStream
public final void setAsciiStream(int parameterIndex, java.io.InputStream x) throws java.sql.SQLException
Implementation note: works identical to
setBinaryStream(int, InputStream)
.- Specified by:
setAsciiStream
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setUnicodeStream
@Deprecated public void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException
Deprecated.Method is no longer supported since Jaybird 3.0.For old behavior use
setBinaryStream(int, InputStream, int)
. For JDBC suggested behavior, usesetCharacterStream(int, Reader, int)
.- Specified by:
setUnicodeStream
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLFeatureNotSupportedException
- Alwaysjava.sql.SQLException
-
setURL
public void setURL(int parameterIndex, java.net.URL url) throws java.sql.SQLException
Jaybird does not support array types.
- Specified by:
setURL
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setNCharacterStream
public void setNCharacterStream(int parameterIndex, java.io.Reader value, long length) throws java.sql.SQLException
Implementation note: This method behaves exactly the same as
setCharacterStream(int, Reader, long)
.- Specified by:
setNCharacterStream
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setNCharacterStream
public void setNCharacterStream(int parameterIndex, java.io.Reader value) throws java.sql.SQLException
Implementation note: This method behaves exactly the same as
setCharacterStream(int, Reader)
.- Specified by:
setNCharacterStream
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setNClob
public void setNClob(int parameterIndex, java.io.Reader reader, long length) throws java.sql.SQLException
Implementation note: This method behaves exactly the same as
setClob(int, Reader, long)
.- Specified by:
setNClob
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setNClob
public void setNClob(int parameterIndex, java.io.Reader reader) throws java.sql.SQLException
Implementation note: This method behaves exactly the same as
setClob(int, Reader)
.- Specified by:
setNClob
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setNString
public void setNString(int parameterIndex, java.lang.String value) throws java.sql.SQLException
Implementation note: This method behaves exactly the same as
setString(int, String)
.- Specified by:
setNString
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
clearParameters
public void clearParameters() throws java.sql.SQLException
- Specified by:
clearParameters
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setObject
public void setObject(int parameterIndex, java.lang.Object x, int targetSqlType, int scale) throws java.sql.SQLException
Implementation note: ignores
scale
andtargetSqlType
and works assetObject(int, Object)
.- Specified by:
setObject
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setObject
public void setObject(int parameterIndex, java.lang.Object x, int targetSqlType) throws java.sql.SQLException
Implementation note: ignores
targetSqlType
and works assetObject(int, Object)
.- Specified by:
setObject
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
execute
public boolean execute() throws java.sql.SQLException
- Specified by:
execute
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
internalExecute
protected boolean internalExecute(boolean sendOutParams) throws java.sql.SQLException
Execute this statement. Method checks whether all parameters are set, flushes all "flushable" fields that might contain cached data and executes the statement.- Parameters:
sendOutParams
- Determines if the XSQLDA structure should be sent to the database- Returns:
true
if the statement has more result sets.- Throws:
java.sql.SQLException
-
isGeneratedKeyQuery
protected boolean isGeneratedKeyQuery()
- Overrides:
isGeneratedKeyQuery
in classFBStatement
- Returns:
true
when the current statement is expected to return generated keys,false
otherwise.
-
addBatch
public void addBatch() throws java.sql.SQLException
- Specified by:
addBatch
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
clearBatch
public void clearBatch() throws java.sql.SQLException
- Specified by:
clearBatch
in interfacejava.sql.Statement
- Overrides:
clearBatch
in classFBStatement
- Throws:
java.sql.SQLException
-
executeBatchInternal
protected java.util.List<java.lang.Long> executeBatchInternal() throws java.sql.SQLException
- Overrides:
executeBatchInternal
in classFBStatement
- Throws:
java.sql.SQLException
-
setCharacterStream
public void setCharacterStream(int parameterIndex, java.io.Reader reader, int length) throws java.sql.SQLException
- Specified by:
setCharacterStream
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setCharacterStream
public void setCharacterStream(int parameterIndex, java.io.Reader reader, long length) throws java.sql.SQLException
- Specified by:
setCharacterStream
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setCharacterStream
public void setCharacterStream(int parameterIndex, java.io.Reader reader) throws java.sql.SQLException
- Specified by:
setCharacterStream
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setRef
public void setRef(int i, java.sql.Ref x) throws java.sql.SQLException
Jaybird does not support ref types.
- Specified by:
setRef
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setBlob
public void setBlob(int parameterIndex, java.sql.Blob blob) throws java.sql.SQLException
- Specified by:
setBlob
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setBlob
public void setBlob(int parameterIndex, java.io.InputStream inputStream, long length) throws java.sql.SQLException
- Specified by:
setBlob
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setBlob
public void setBlob(int parameterIndex, java.io.InputStream inputStream) throws java.sql.SQLException
- Specified by:
setBlob
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setClob
public void setClob(int parameterIndex, java.sql.Clob clob) throws java.sql.SQLException
- Specified by:
setClob
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setClob
public void setClob(int parameterIndex, java.io.Reader reader, long length) throws java.sql.SQLException
- Specified by:
setClob
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setClob
public void setClob(int parameterIndex, java.io.Reader reader) throws java.sql.SQLException
- Specified by:
setClob
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setArray
public void setArray(int i, java.sql.Array x) throws java.sql.SQLException
Jaybird does not support array types.
- Specified by:
setArray
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
getMetaData
public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException
- Specified by:
getMetaData
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setDate
public void setDate(int parameterIndex, java.sql.Date x, java.util.Calendar cal) throws java.sql.SQLException
- Specified by:
setDate
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setTime
public void setTime(int parameterIndex, java.sql.Time x, java.util.Calendar cal) throws java.sql.SQLException
- Specified by:
setTime
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setTimestamp
public void setTimestamp(int parameterIndex, java.sql.Timestamp x, java.util.Calendar cal) throws java.sql.SQLException
- Specified by:
setTimestamp
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setNull
public void setNull(int parameterIndex, int sqlType, java.lang.String typeName) throws java.sql.SQLException
- Specified by:
setNull
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
prepareFixedStatement
protected void prepareFixedStatement(java.lang.String sql) throws java.sql.SQLException
Prepare fixed statement and initialize parameters.- Overrides:
prepareFixedStatement
in classFBStatement
- Throws:
java.sql.SQLException
-
getExecutionPlan
public java.lang.String getExecutionPlan() throws java.sql.SQLException
Description copied from interface:FirebirdPreparedStatement
Get the execution plan of this PreparedStatement- Specified by:
getExecutionPlan
in interfaceFirebirdPreparedStatement
- Returns:
- The execution plan of the statement
- Throws:
java.sql.SQLException
-
getExplainedExecutionPlan
public java.lang.String getExplainedExecutionPlan() throws java.sql.SQLException
Description copied from interface:FirebirdPreparedStatement
Get the detailed execution plan of this PreparedStatement- Specified by:
getExplainedExecutionPlan
in interfaceFirebirdPreparedStatement
- Returns:
- The detailed execution plan of the statement
- Throws:
java.sql.SQLException
-
getStatementType
public int getStatementType() throws java.sql.SQLException
Description copied from interface:FirebirdPreparedStatement
Get the statement type of this PreparedStatement. The returned value will be one of theTYPE_*
constant values.- Specified by:
getStatementType
in interfaceFirebirdPreparedStatement
- Returns:
- The identifier for the given statement's type
- Throws:
java.sql.SQLException
-
getParameterMetaData
public java.sql.ParameterMetaData getParameterMetaData() throws java.sql.SQLException
- Specified by:
getParameterMetaData
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setNClob
public void setNClob(int parameterIndex, java.sql.NClob value) throws java.sql.SQLException
Implementation note: This method behaves exactly the same as
setClob(int, Clob)
.- Specified by:
setNClob
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setRowId
public void setRowId(int parameterIndex, java.sql.RowId x) throws java.sql.SQLException
- Specified by:
setRowId
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
setSQLXML
public void setSQLXML(int parameterIndex, java.sql.SQLXML xmlObject) throws java.sql.SQLException
Jaybird does not support SQLXML.
- Specified by:
setSQLXML
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
executeQuery
public java.sql.ResultSet executeQuery(java.lang.String sql) throws java.sql.SQLException
- Specified by:
executeQuery
in interfacejava.sql.Statement
- Overrides:
executeQuery
in classFBStatement
- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql) throws java.sql.SQLException
- Specified by:
executeUpdate
in interfacejava.sql.Statement
- Overrides:
executeUpdate
in classFBStatement
- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql) throws java.sql.SQLException
- Specified by:
execute
in interfacejava.sql.Statement
- Overrides:
execute
in classFBStatement
- Throws:
java.sql.SQLException
-
addBatch
public void addBatch(java.lang.String sql) throws java.sql.SQLException
- Specified by:
addBatch
in interfacejava.sql.Statement
- Overrides:
addBatch
in classFBStatement
- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
- Specified by:
executeUpdate
in interfacejava.sql.Statement
- Overrides:
executeUpdate
in classFBStatement
- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql, int[] columnIndex) throws java.sql.SQLException
- Specified by:
executeUpdate
in interfacejava.sql.Statement
- Overrides:
executeUpdate
in classFBStatement
- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
- Specified by:
executeUpdate
in interfacejava.sql.Statement
- Overrides:
executeUpdate
in classFBStatement
- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
- Specified by:
execute
in interfacejava.sql.Statement
- Overrides:
execute
in classFBStatement
- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException
- Specified by:
execute
in interfacejava.sql.Statement
- Overrides:
execute
in classFBStatement
- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
- Specified by:
execute
in interfacejava.sql.Statement
- Overrides:
execute
in classFBStatement
- Throws:
java.sql.SQLException
-
executeLargeUpdate
public long executeLargeUpdate() throws java.sql.SQLException
- Specified by:
executeLargeUpdate
in interfacejava.sql.PreparedStatement
- Throws:
java.sql.SQLException
-
-