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.StringMETHOD_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 protectedFBPreparedStatement(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.protectedFBPreparedStatement(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 voidaddBatch()voidaddBatch(java.lang.String sql)voidclearBatch()voidclearParameters()voidcompleteStatement(CompletionReason reason)booleanexecute()booleanexecute(java.lang.String sql)booleanexecute(java.lang.String sql, int autoGeneratedKeys)booleanexecute(java.lang.String sql, int[] columnIndexes)booleanexecute(java.lang.String sql, java.lang.String[] columnNames)protected java.util.List<java.lang.Long>executeBatchInternal()longexecuteLargeUpdate()java.sql.ResultSetexecuteQuery()java.sql.ResultSetexecuteQuery(java.lang.String sql)intexecuteUpdate()intexecuteUpdate(java.lang.String sql)intexecuteUpdate(java.lang.String sql, int autoGeneratedKeys)intexecuteUpdate(java.lang.String sql, int[] columnIndex)intexecuteUpdate(java.lang.String sql, java.lang.String[] columnNames)java.lang.StringgetExecutionPlan()Get the execution plan of this PreparedStatementjava.lang.StringgetExplainedExecutionPlan()Get the detailed execution plan of this PreparedStatementprotected FBFieldgetField(int columnIndex)Factory method for the field access objectsFirebirdParameterMetaDatagetFirebirdParameterMetaData()java.sql.ResultSetMetaDatagetMetaData()protected FieldDescriptorgetParameterDescriptor(int columnIndex)Returns theFieldDescriptorof the specified parameter.java.sql.ParameterMetaDatagetParameterMetaData()intgetStatementType()Get the statement type of this PreparedStatement.protected booleaninternalExecute(boolean sendOutParams)Execute this statement.protected booleanisGeneratedKeyQuery()protected booleanneedsScrollableCursorEnabled()protected voidnotifyStatementCompleted(boolean success)Notifies statement completion.protected voidprepareFixedStatement(java.lang.String sql)Prepare fixed statement and initialize parameters.voidsetArray(int i, java.sql.Array x)voidsetAsciiStream(int parameterIndex, java.io.InputStream x)voidsetAsciiStream(int parameterIndex, java.io.InputStream x, int length)voidsetAsciiStream(int parameterIndex, java.io.InputStream x, long length)voidsetBigDecimal(int parameterIndex, java.math.BigDecimal x)voidsetBinaryStream(int parameterIndex, java.io.InputStream inputStream)voidsetBinaryStream(int parameterIndex, java.io.InputStream inputStream, int length)voidsetBinaryStream(int parameterIndex, java.io.InputStream inputStream, long length)voidsetBlob(int parameterIndex, java.io.InputStream inputStream)voidsetBlob(int parameterIndex, java.io.InputStream inputStream, long length)voidsetBlob(int parameterIndex, java.sql.Blob blob)voidsetBoolean(int parameterIndex, boolean x)voidsetByte(int parameterIndex, byte x)voidsetBytes(int parameterIndex, byte[] x)voidsetCharacterStream(int parameterIndex, java.io.Reader reader)voidsetCharacterStream(int parameterIndex, java.io.Reader reader, int length)voidsetCharacterStream(int parameterIndex, java.io.Reader reader, long length)voidsetClob(int parameterIndex, java.io.Reader reader)voidsetClob(int parameterIndex, java.io.Reader reader, long length)voidsetClob(int parameterIndex, java.sql.Clob clob)voidsetDate(int parameterIndex, java.sql.Date x)voidsetDate(int parameterIndex, java.sql.Date x, java.util.Calendar cal)voidsetDouble(int parameterIndex, double x)voidsetFloat(int parameterIndex, float x)voidsetInt(int parameterIndex, int x)voidsetLong(int parameterIndex, long x)voidsetNCharacterStream(int parameterIndex, java.io.Reader value)voidsetNCharacterStream(int parameterIndex, java.io.Reader value, long length)voidsetNClob(int parameterIndex, java.io.Reader reader)voidsetNClob(int parameterIndex, java.io.Reader reader, long length)voidsetNClob(int parameterIndex, java.sql.NClob value)voidsetNString(int parameterIndex, java.lang.String value)voidsetNull(int parameterIndex, int sqlType)voidsetNull(int parameterIndex, int sqlType, java.lang.String typeName)voidsetObject(int parameterIndex, java.lang.Object x)voidsetObject(int parameterIndex, java.lang.Object x, int targetSqlType)voidsetObject(int parameterIndex, java.lang.Object x, int targetSqlType, int scale)voidsetObject(int parameterIndex, java.lang.Object x, java.sql.SQLType targetSqlType)voidsetObject(int parameterIndex, java.lang.Object x, java.sql.SQLType targetSqlType, int scaleOrLength)voidsetRef(int i, java.sql.Ref x)voidsetRowId(int parameterIndex, java.sql.RowId x)voidsetShort(int parameterIndex, short x)voidsetSQLXML(int parameterIndex, java.sql.SQLXML xmlObject)voidsetString(int parameterIndex, java.lang.String x)voidsetTime(int parameterIndex, java.sql.Time x)voidsetTime(int parameterIndex, java.sql.Time x, java.util.Calendar cal)voidsetTimestamp(int parameterIndex, java.sql.Timestamp x)voidsetTimestamp(int parameterIndex, java.sql.Timestamp x, java.util.Calendar cal)voidsetUnicodeStream(int parameterIndex, java.io.InputStream x, int length)Deprecated.voidsetURL(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 inFBCallableStatementsince the statement is prepared right before the execution.- Parameters:
c- instance ofGDSHelperthat 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:
completeStatementin classFBStatement- Throws:
java.sql.SQLException
-
notifyStatementCompleted
protected void notifyStatementCompleted(boolean success) throws java.sql.SQLExceptionDescription copied from class:FBStatementNotifies statement completion.Use of
success = falseshould not be generally used for failing execution. The only difference betweentrueandfalseis 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:
notifyStatementCompletedin classFBStatement- Parameters:
success-truenotify successful completion,falsefor unsuccessful completion- Throws:
java.sql.SQLException- exception from handling statement completion (e.g. commit or rollback in auto-commit)
-
needsScrollableCursorEnabled
protected boolean needsScrollableCursorEnabled()
- Overrides:
needsScrollableCursorEnabledin classFBStatement
-
executeQuery
public java.sql.ResultSet executeQuery() throws java.sql.SQLException- Specified by:
executeQueryin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate() throws java.sql.SQLException- Specified by:
executeUpdatein 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:
setNullin 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:
setBinaryStreamin 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:
setBinaryStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setBinaryStream
public void setBinaryStream(int parameterIndex, java.io.InputStream inputStream) throws java.sql.SQLException- Specified by:
setBinaryStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setBytes
public void setBytes(int parameterIndex, byte[] x) throws java.sql.SQLException- Specified by:
setBytesin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setBoolean
public void setBoolean(int parameterIndex, boolean x) throws java.sql.SQLException- Specified by:
setBooleanin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setByte
public void setByte(int parameterIndex, byte x) throws java.sql.SQLException- Specified by:
setBytein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setDate
public void setDate(int parameterIndex, java.sql.Date x) throws java.sql.SQLException- Specified by:
setDatein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setDouble
public void setDouble(int parameterIndex, double x) throws java.sql.SQLException- Specified by:
setDoublein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setFloat
public void setFloat(int parameterIndex, float x) throws java.sql.SQLException- Specified by:
setFloatin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setInt
public void setInt(int parameterIndex, int x) throws java.sql.SQLException- Specified by:
setIntin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setLong
public void setLong(int parameterIndex, long x) throws java.sql.SQLException- Specified by:
setLongin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setObject
public void setObject(int parameterIndex, java.lang.Object x) throws java.sql.SQLException- Specified by:
setObjectin 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.SQLExceptionImplementation note: behaves as
setObject(int, Object, int, int)called withSQLType.getVendorTypeNumber().- Specified by:
setObjectin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setObject
public void setObject(int parameterIndex, java.lang.Object x, java.sql.SQLType targetSqlType) throws java.sql.SQLExceptionImplementation note: behaves as
setObject(int, Object, int)called withSQLType.getVendorTypeNumber().- Specified by:
setObjectin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setShort
public void setShort(int parameterIndex, short x) throws java.sql.SQLException- Specified by:
setShortin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setString
public void setString(int parameterIndex, java.lang.String x) throws java.sql.SQLException- Specified by:
setStringin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setTime
public void setTime(int parameterIndex, java.sql.Time x) throws java.sql.SQLException- Specified by:
setTimein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setTimestamp
public void setTimestamp(int parameterIndex, java.sql.Timestamp x) throws java.sql.SQLException- Specified by:
setTimestampin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setBigDecimal
public void setBigDecimal(int parameterIndex, java.math.BigDecimal x) throws java.sql.SQLException- Specified by:
setBigDecimalin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
getParameterDescriptor
protected FieldDescriptor getParameterDescriptor(int columnIndex)
Returns theFieldDescriptorof 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.SQLExceptionImplementation note: works identical to
setBinaryStream(int, InputStream, int).- Specified by:
setAsciiStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setAsciiStream
public final void setAsciiStream(int parameterIndex, java.io.InputStream x, long length) throws java.sql.SQLExceptionImplementation note: works identical to
setBinaryStream(int, InputStream, long).- Specified by:
setAsciiStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setAsciiStream
public final void setAsciiStream(int parameterIndex, java.io.InputStream x) throws java.sql.SQLExceptionImplementation note: works identical to
setBinaryStream(int, InputStream).- Specified by:
setAsciiStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setUnicodeStream
@Deprecated public void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLExceptionDeprecated.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:
setUnicodeStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLFeatureNotSupportedException- Alwaysjava.sql.SQLException
-
setURL
public void setURL(int parameterIndex, java.net.URL url) throws java.sql.SQLExceptionJaybird does not support array types.
- Specified by:
setURLin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNCharacterStream
public void setNCharacterStream(int parameterIndex, java.io.Reader value, long length) throws java.sql.SQLExceptionImplementation note: This method behaves exactly the same as
setCharacterStream(int, Reader, long).- Specified by:
setNCharacterStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNCharacterStream
public void setNCharacterStream(int parameterIndex, java.io.Reader value) throws java.sql.SQLExceptionImplementation note: This method behaves exactly the same as
setCharacterStream(int, Reader).- Specified by:
setNCharacterStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNClob
public void setNClob(int parameterIndex, java.io.Reader reader, long length) throws java.sql.SQLExceptionImplementation note: This method behaves exactly the same as
setClob(int, Reader, long).- Specified by:
setNClobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNClob
public void setNClob(int parameterIndex, java.io.Reader reader) throws java.sql.SQLExceptionImplementation note: This method behaves exactly the same as
setClob(int, Reader).- Specified by:
setNClobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNString
public void setNString(int parameterIndex, java.lang.String value) throws java.sql.SQLExceptionImplementation note: This method behaves exactly the same as
setString(int, String).- Specified by:
setNStringin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
clearParameters
public void clearParameters() throws java.sql.SQLException- Specified by:
clearParametersin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setObject
public void setObject(int parameterIndex, java.lang.Object x, int targetSqlType, int scale) throws java.sql.SQLExceptionImplementation note: ignores
scaleandtargetSqlTypeand works assetObject(int, Object).- Specified by:
setObjectin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setObject
public void setObject(int parameterIndex, java.lang.Object x, int targetSqlType) throws java.sql.SQLExceptionImplementation note: ignores
targetSqlTypeand works assetObject(int, Object).- Specified by:
setObjectin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
execute
public boolean execute() throws java.sql.SQLException- Specified by:
executein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
internalExecute
protected boolean internalExecute(boolean sendOutParams) throws java.sql.SQLExceptionExecute 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:
trueif the statement has more result sets.- Throws:
java.sql.SQLException
-
isGeneratedKeyQuery
protected boolean isGeneratedKeyQuery()
- Overrides:
isGeneratedKeyQueryin classFBStatement- Returns:
truewhen the current statement is expected to return generated keys,falseotherwise.
-
addBatch
public void addBatch() throws java.sql.SQLException- Specified by:
addBatchin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
clearBatch
public void clearBatch() throws java.sql.SQLException- Specified by:
clearBatchin interfacejava.sql.Statement- Overrides:
clearBatchin classFBStatement- Throws:
java.sql.SQLException
-
executeBatchInternal
protected java.util.List<java.lang.Long> executeBatchInternal() throws java.sql.SQLException- Overrides:
executeBatchInternalin classFBStatement- Throws:
java.sql.SQLException
-
setCharacterStream
public void setCharacterStream(int parameterIndex, java.io.Reader reader, int length) throws java.sql.SQLException- Specified by:
setCharacterStreamin 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:
setCharacterStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setCharacterStream
public void setCharacterStream(int parameterIndex, java.io.Reader reader) throws java.sql.SQLException- Specified by:
setCharacterStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setRef
public void setRef(int i, java.sql.Ref x) throws java.sql.SQLExceptionJaybird does not support ref types.
- Specified by:
setRefin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setBlob
public void setBlob(int parameterIndex, java.sql.Blob blob) throws java.sql.SQLException- Specified by:
setBlobin 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:
setBlobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setBlob
public void setBlob(int parameterIndex, java.io.InputStream inputStream) throws java.sql.SQLException- Specified by:
setBlobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setClob
public void setClob(int parameterIndex, java.sql.Clob clob) throws java.sql.SQLException- Specified by:
setClobin 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:
setClobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setClob
public void setClob(int parameterIndex, java.io.Reader reader) throws java.sql.SQLException- Specified by:
setClobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setArray
public void setArray(int i, java.sql.Array x) throws java.sql.SQLExceptionJaybird does not support array types.
- Specified by:
setArrayin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
getMetaData
public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException- Specified by:
getMetaDatain 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:
setDatein 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:
setTimein 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:
setTimestampin 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:
setNullin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
prepareFixedStatement
protected void prepareFixedStatement(java.lang.String sql) throws java.sql.SQLExceptionPrepare fixed statement and initialize parameters.- Overrides:
prepareFixedStatementin classFBStatement- Throws:
java.sql.SQLException
-
getExecutionPlan
public java.lang.String getExecutionPlan() throws java.sql.SQLExceptionDescription copied from interface:FirebirdPreparedStatementGet the execution plan of this PreparedStatement- Specified by:
getExecutionPlanin interfaceFirebirdPreparedStatement- Returns:
- The execution plan of the statement
- Throws:
java.sql.SQLException
-
getExplainedExecutionPlan
public java.lang.String getExplainedExecutionPlan() throws java.sql.SQLExceptionDescription copied from interface:FirebirdPreparedStatementGet the detailed execution plan of this PreparedStatement- Specified by:
getExplainedExecutionPlanin interfaceFirebirdPreparedStatement- Returns:
- The detailed execution plan of the statement
- Throws:
java.sql.SQLException
-
getStatementType
public int getStatementType() throws java.sql.SQLExceptionDescription copied from interface:FirebirdPreparedStatementGet the statement type of this PreparedStatement. The returned value will be one of theTYPE_*constant values.- Specified by:
getStatementTypein 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:
getParameterMetaDatain interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNClob
public void setNClob(int parameterIndex, java.sql.NClob value) throws java.sql.SQLExceptionImplementation note: This method behaves exactly the same as
setClob(int, Clob).- Specified by:
setNClobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setRowId
public void setRowId(int parameterIndex, java.sql.RowId x) throws java.sql.SQLException- Specified by:
setRowIdin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setSQLXML
public void setSQLXML(int parameterIndex, java.sql.SQLXML xmlObject) throws java.sql.SQLExceptionJaybird does not support SQLXML.
- Specified by:
setSQLXMLin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
executeQuery
public java.sql.ResultSet executeQuery(java.lang.String sql) throws java.sql.SQLException- Specified by:
executeQueryin interfacejava.sql.Statement- Overrides:
executeQueryin classFBStatement- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql) throws java.sql.SQLException- Specified by:
executeUpdatein interfacejava.sql.Statement- Overrides:
executeUpdatein classFBStatement- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql) throws java.sql.SQLException- Specified by:
executein interfacejava.sql.Statement- Overrides:
executein classFBStatement- Throws:
java.sql.SQLException
-
addBatch
public void addBatch(java.lang.String sql) throws java.sql.SQLException- Specified by:
addBatchin interfacejava.sql.Statement- Overrides:
addBatchin classFBStatement- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException- Specified by:
executeUpdatein interfacejava.sql.Statement- Overrides:
executeUpdatein classFBStatement- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql, int[] columnIndex) throws java.sql.SQLException- Specified by:
executeUpdatein interfacejava.sql.Statement- Overrides:
executeUpdatein classFBStatement- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException- Specified by:
executeUpdatein interfacejava.sql.Statement- Overrides:
executeUpdatein classFBStatement- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException- Specified by:
executein interfacejava.sql.Statement- Overrides:
executein classFBStatement- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException- Specified by:
executein interfacejava.sql.Statement- Overrides:
executein classFBStatement- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException- Specified by:
executein interfacejava.sql.Statement- Overrides:
executein classFBStatement- Throws:
java.sql.SQLException
-
executeLargeUpdate
public long executeLargeUpdate() throws java.sql.SQLException- Specified by:
executeLargeUpdatein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
-