Package org.monetdb.monetdbe
Class MonetPreparedStatement
java.lang.Object
org.monetdb.monetdbe.MonetWrapper
org.monetdb.monetdbe.MonetStatement
org.monetdb.monetdbe.MonetPreparedStatement
- All Implemented Interfaces:
AutoCloseable,PreparedStatement,Statement,Wrapper
- Direct Known Subclasses:
MonetCallableStatement
public class MonetPreparedStatement extends MonetStatement implements PreparedStatement
A
PreparedStatement suitable for the MonetDB embedded database.
An object that represents a precompiled SQL statement. A SQL statement is precompiled and stored in a PreparedStatement object.
This object can then be used to efficiently execute this statement multiple times.
Note: The setter methods (setShort, setString, and so on) for setting IN parameter values must specify types that are compatible with
the defined SQL type of the input parameter. For instance, if the IN parameter has SQL type INTEGER, then the method setInt should be used.
If arbitrary parameter type conversions are required, the method setObject should be used with a target SQL type.-
Field Summary
Fields Modifier and Type Field Description protected int[]monetdbeTypesArray of types of bind-able parametersprotected intnParamsNumber of bind-able parametersprotected ByteBufferstatementNativeThe pointer to the C statement objectFields inherited from class org.monetdb.monetdbe.MonetStatement
batch, conn, largeUpdateCount, resultSet, updateCountFields 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
Constructors Constructor Description MonetPreparedStatement(MonetConnection conn, String sql)Prepared statement constructor, calls monetdbe_prepare() and super-class Statement constructor. -
Method Summary
Modifier and Type Method Description voidaddBatch()Adds a set of parameters to this PreparedStatement object's batch of commands.voidaddBatch(String q)Override the addBatch from the Statement to throw a SQLExceptionvoidclearBatch()Empties this PreparedStatements object's current list of parameters.voidclearParameters()Clears the current parameter values immediately.booleanexecute()Executes the SQL statement in this PreparedStatement object, which may be any kind of SQL statement.booleanexecute(String q)Override the execute from the Statement to throw a SQLExceptionint[]executeBatch()Submits a batch of different parameterized versions of the prepared query to the database for execution.long[]executeLargeBatch()Submits a batch of different parameterized versions of the prepared query to the database for execution.longexecuteLargeUpdate()Executes the SQL statement in this PreparedStatement object, which may be any kind of SQL statement.ResultSetexecuteQuery()Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query.ResultSetexecuteQuery(String q)Override the executeQuery from the Statement to throw a SQLExceptionintexecuteUpdate()Executes the SQL statement in this PreparedStatement object, which must be an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.intexecuteUpdate(String q)Override the executeUpdate from the Statement to throw a SQLExceptionResultSetMetaDatagetMetaData()Retrieves a ResultSetMetaData object that contains information about the columns of the ResultSet object that will be returned when this PreparedStatement object is executed.ParameterMetaDatagetParameterMetaData()Retrieves the number, types and properties of this PreparedStatement object's parameters.voidsetArray(int parameterIndex, Array x)Feature not supported.voidsetAsciiStream(int parameterIndex, InputStream x)Feature not supported.voidsetAsciiStream(int parameterIndex, InputStream x, int length)Feature not supported.voidsetAsciiStream(int parameterIndex, InputStream x, long length)Feature not supported.voidsetBigDecimal(int parameterIndex, BigDecimal x)Sets the designated parameter to the given Java java.math.BigDecimal value.voidsetBigInteger(int parameterIndex, BigInteger x)Sets the designated parameter to the given Java java.math.BigInteger value.voidsetBinaryStream(int parameterIndex, InputStream x)Feature not supported.voidsetBinaryStream(int parameterIndex, InputStream x, int length)Feature not supported.voidsetBinaryStream(int parameterIndex, InputStream x, long length)Feature not supported.voidsetBlob(int parameterIndex, InputStream inputStream)Feature not supported.voidsetBlob(int parameterIndex, InputStream inputStream, long length)Feature not supported.voidsetBlob(int parameterIndex, Blob x)Sets the designated parameter to the given Java java.sql.Blob value.voidsetBoolean(int parameterIndex, boolean x)Sets the designated parameter to the given Java boolean value.voidsetByte(int parameterIndex, byte x)Sets the designated parameter to the given Java byte value.voidsetBytes(int parameterIndex, byte[] x)Sets the designated parameter to the given Java byte[] value.voidsetCharacterStream(int parameterIndex, Reader reader)Similar to setClob(int,Reader).voidsetCharacterStream(int parameterIndex, Reader reader, int length)Similar to setClob(int,Reader,long).voidsetCharacterStream(int parameterIndex, Reader reader, long length)Similar to setClob(int,Reader,long).voidsetClob(int parameterIndex, Reader reader)voidsetClob(int parameterIndex, Reader reader, long length)voidsetClob(int parameterIndex, Clob x)Sets the designated parameter to the given Java java.sql.Clob value.voidsetDate(int parameterIndex, Date x)Sets the designated parameter to the given Java java.sql.Date value.voidsetDate(int parameterIndex, Date x, Calendar cal)Sets the designated parameter to the given java.sql.Date value, using the given Calendar object.voidsetDouble(int parameterIndex, double x)Sets the designated parameter to the given Java double value.voidsetFloat(int parameterIndex, float x)Sets the designated parameter to the given Java float value.voidsetInt(int parameterIndex, int x)Sets the designated parameter to the given Java int value.voidsetLong(int parameterIndex, long x)Sets the designated parameter to the given Java long value.voidsetNCharacterStream(int parameterIndex, Reader value)Similar to setClob(int,Reader).voidsetNCharacterStream(int parameterIndex, Reader value, long length)Similar to setClob(int,Reader,long).voidsetNClob(int parameterIndex, Reader reader)Feature not supported.voidsetNClob(int parameterIndex, Reader reader, long length)Feature not supported.voidsetNClob(int parameterIndex, NClob value)Feature not supported.voidsetNString(int parameterIndex, String value)Similar to setString(int,String).voidsetNull(int parameterIndex, int sqlType)Sets the designated parameter to SQL NULL.voidsetNull(int parameterIndex, int sqlType, String typeName)Sets the designated parameter to SQL NULL.voidsetObject(int parameterIndex, Object x)Sets the value of the designated parameter using the given object.voidsetObject(int parameterIndex, Object x, int targetSqlType)Sets the value of the designated parameter with the given object.voidsetObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength)Sets the value of the designated parameter with the given object.voidsetObject(int parameterIndex, Object x, SQLType targetSqlType)Sets the value of the designated parameter with the given object.voidsetObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength)Sets the value of the designated parameter with the given object.voidsetRef(int parameterIndex, Ref x)Feature not supported.voidsetRowId(int parameterIndex, RowId x)Feature not supported.voidsetShort(int parameterIndex, short x)Sets the designated parameter to the given Java short value.voidsetSQLXML(int parameterIndex, SQLXML xmlObject)Feature not supported.voidsetString(int parameterIndex, String x)Sets the designated parameter to the given Java String value.voidsetTime(int parameterIndex, Time x)Sets the designated parameter to the given Java java.sql.Time value.voidsetTime(int parameterIndex, Time x, Calendar cal)Sets the designated parameter to the given java.sql.Time value, using the given Calendar object.voidsetTimestamp(int parameterIndex, Timestamp x)Sets the designated parameter to the given Java java.sql.Timestamp value.voidsetTimestamp(int parameterIndex, Timestamp x, Calendar cal)Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object.voidsetUnicodeStream(int parameterIndex, InputStream x, int length)Feature not supported.voidsetURL(int parameterIndex, URL x)Sets the designated parameter to the given Java java.net.URL value.Methods inherited from class org.monetdb.monetdbe.MonetStatement
cancel, checkNotClosed, clearWarnings, close, closeIfComplete, closeOnCompletion, execute, execute, execute, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeoutMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.Statement
cancel, clearWarnings, close, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeUpdate, executeUpdate, executeUpdate, 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 Details
-
statementNative
The pointer to the C statement object -
nParams
protected int nParamsNumber of bind-able parameters -
monetdbeTypes
protected int[] monetdbeTypesArray of types of bind-able parameters
-
-
Constructor Details
-
MonetPreparedStatement
Prepared statement constructor, calls monetdbe_prepare() and super-class Statement constructor. The prepared statement is destroyed if the monetdbe_prepare() call returned an error. The nParams, monetdbeTypes and statementNative variables are set within monetdbe_prepare();- Parameters:
conn- parent connectionsql- query to prepare
-
-
Method Details
-
execute
Executes the SQL statement in this PreparedStatement object, which may be any kind of SQL statement. The execute method returns a boolean to indicate the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result (either a ResultSet object or an int representing the update count). Multiple results may result from the SQL statement, but only the first one may be retrieved in the current version.- Specified by:
executein interfacePreparedStatement- Returns:
- true if the first result is a ResultSet object; false if it is an update count or there are no results
- Throws:
SQLException- if a database access error occurs or an argument is supplied to this method
-
execute
Override the execute from the Statement to throw a SQLException- Specified by:
executein interfaceStatement- Overrides:
executein classMonetStatement- Parameters:
q- any SQL statement- Returns:
- true if the first result is a ResultSet object; false if it is an update count or there are no results
- Throws:
SQLException- if a database access error occurs or this method is called on a closed Statement
-
executeQuery
Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query.- Specified by:
executeQueryin interfacePreparedStatement- Returns:
- a ResultSet object that contains the data produced by the query; never null
- Throws:
SQLException- if a database access error occurs; this method is called on a closed PreparedStatement or the SQL statement does not return a ResultSet object
-
executeQuery
Override the executeQuery from the Statement to throw a SQLException- Specified by:
executeQueryin interfaceStatement- Overrides:
executeQueryin classMonetStatement- Parameters:
q- an SQL statement to be sent to the database, typically a static SQL SELECT statement- Returns:
- a ResultSet object that contains the data produced by the given query; never null
- Throws:
SQLException- if a database access error occurs or the given SQL statement produces anything other than a single ResultSet object
-
executeUpdate
Executes the SQL statement in this PreparedStatement object, which must be an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.- Specified by:
executeUpdatein interfacePreparedStatement- Returns:
- either (1) the row count for SQL Data Manipulation Language (DML) statements or (2) 0 for SQL statements that return nothing
- Throws:
SQLException- if a database access error occurs; this method is called on a closed PreparedStatement or the SQL statement returns a ResultSet object
-
executeUpdate
Override the executeUpdate from the Statement to throw a SQLException- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classMonetStatement- Parameters:
q- an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing- Returns:
- either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing
- Throws:
SQLException- if a database access error occurs or the given SQL statement produces a ResultSet object
-
addBatch
Adds a set of parameters to this PreparedStatement object's batch of commands.- Specified by:
addBatchin interfacePreparedStatement- Throws:
SQLException- if a database access error occurs, this method is called on a closed PreparedStatement or an argument is supplied to this method
-
addBatch
Override the addBatch from the Statement to throw a SQLException- Specified by:
addBatchin interfaceStatement- Overrides:
addBatchin classMonetStatement- Parameters:
q- typically this is a SQL INSERT or UPDATE statement- Throws:
SQLException- if a database access error occurs, this method is called on a closed Statement, the driver does not support batch updatesor the method is called on a PreparedStatement or CallableStatement
-
executeBatch
Submits a batch of different parameterized versions of the prepared query to the database for execution. If all commands execute successfully, returns an array of update counts. The int elements of the array that is returned are ordered to correspond to the commands in the batch, which are ordered according to the order in which they were added to the batch. This method overrides Statement's implementation, which batches different queries instead of different parameters for same prepared query.- Specified by:
executeBatchin interfaceStatement- Overrides:
executeBatchin classMonetStatement- Returns:
- an array of update counts containing one element for each command in the batch. The elements of the array are ordered according to the order in which commands were added to the batch.
- Throws:
SQLException- if a database access error occurs or this method is called on a closed PreparedStatementBatchUpdateException- if one of the commands sent to the database fails to execute properly or attempts to return a result set
-
executeLargeBatch
Submits a batch of different parameterized versions of the prepared query to the database for execution. If all commands execute successfully, returns an array of update counts. The int elements of the array that is returned are ordered to correspond to the commands in the batch, which are ordered according to the order in which they were added to the batch. This method overrides Statement's implementation, which batches different queries instead of different parameters for same prepared query. This method should be used when the returned row count may exceed Integer.MAX_VALUE.- Specified by:
executeLargeBatchin interfaceStatement- Overrides:
executeLargeBatchin classMonetStatement- Returns:
- an array of update counts containing one element for each command in the batch. The elements of the array are ordered according to the order in which commands were added to the batch.
- Throws:
SQLException- if a database access error occurs or this method is called on a closed PreparedStatementBatchUpdateException- if one of the commands sent to the database fails to execute properly or attempts to return a result set
-
clearBatch
Empties this PreparedStatements object's current list of parameters. This method overrides Statement's implementation, which clears different batched queries instead of different batched parameters for same prepared query.- Specified by:
clearBatchin interfaceStatement- Overrides:
clearBatchin classMonetStatement- Throws:
SQLException- if this method is called on a closed PreparedStatement
-
executeLargeUpdate
Executes the SQL statement in this PreparedStatement object, which may be any kind of SQL statement. The execute method returns a boolean to indicate the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result (either a ResultSet object or an int representing the update count). Multiple results may result from the SQL statement, but only the first one may be retrieved in the current version. This method should be used when the returned row count may exceed Integer.MAX_VALUE.- Specified by:
executeLargeUpdatein interfacePreparedStatement- Returns:
- true if the first result is a ResultSet object; false if it is an update count or there are no results
- Throws:
SQLException- if a database access error occurs or an argument is supplied to this method
-
getMetaData
Retrieves a ResultSetMetaData object that contains information about the columns of the ResultSet object that will be returned when this PreparedStatement object is executed. Because a PreparedStatement object is precompiled, it is possible to know about the ResultSet object that it will return without having to execute it. Consequently, it is possible to invoke the method getMetaData on a PreparedStatement object rather than waiting to execute it and then invoking the ResultSet.getMetaData method on the ResultSet object that is returned. Not currently supported- Specified by:
getMetaDatain interfacePreparedStatement- Returns:
- the description of a ResultSet object's columns or null if the driver cannot return a ResultSetMetaData object
- Throws:
SQLException- if this method is called on a closed PreparedStatement
-
getParameterMetaData
Retrieves the number, types and properties of this PreparedStatement object's parameters.- Specified by:
getParameterMetaDatain interfacePreparedStatement- Returns:
- a ParameterMetaData object that contains information about the number, types and properties for each parameter marker of this PreparedStatement object
- Throws:
SQLException- if this method is called on a closed PreparedStatement
-
clearParameters
Clears the current parameter values immediately. Current version also cleans up the prepared statement, closing this object.- Specified by:
clearParametersin interfacePreparedStatement- Throws:
SQLException- if this method is called on a closed PreparedStatement
-
setObject
public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLExceptionSets the value of the designated parameter with the given object. The given Java object will be converted to the given targetSqlType before being sent to the database.- Specified by:
setObjectin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the object containing the input parameter valuetargetSqlType- the SQL type (as defined in java.sql.Types) to be sent to the databasescaleOrLength- for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setObject
public void setObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLExceptionSets the value of the designated parameter with the given object. The given Java object will be converted to the given targetSqlType before being sent to the database.- Specified by:
setObjectin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the object containing the input parameter valuetargetSqlType- the SQL type to be sent to the databasescaleOrLength- for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setObject
Sets the value of the designated parameter with the given object. The given Java object will be converted to the given targetSqlType before being sent to the database.- Specified by:
setObjectin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the object containing the input parameter valuetargetSqlType- the SQL type to be sent to the database if a database access error occurs or this method is called on a closed PreparedStatement- Throws:
SQLException
-
setObject
Sets the value of the designated parameter with the given object. This method is similar to setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength), except that it assumes a scale of zero.- Specified by:
setObjectin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the object containing the input parameter valuetargetSqlType- the SQL type (as defined in java.sql.Types) to be sent to the database- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setObject
Sets the value of the designated parameter using the given object. The JDBC specification specifies a standard mapping from Java Object types to SQL types. The given argument will be converted to the corresponding SQL type before being sent to the database.- Specified by:
setObjectin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the object containing the input parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setNull
Sets the designated parameter to SQL NULL. Note: You must specify the parameter's SQL type.- Specified by:
setNullin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)sqlType- the SQL type code defined in java.sql.Types- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatementSQLFeatureNotSupportedException- - if sqlType is not supported
-
setBoolean
Sets the designated parameter to the given Java boolean value.- Specified by:
setBooleanin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setByte
Sets the designated parameter to the given Java byte value.- Specified by:
setBytein interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setShort
Sets the designated parameter to the given Java short value.- Specified by:
setShortin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setInt
Sets the designated parameter to the given Java int value.- Specified by:
setIntin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setLong
Sets the designated parameter to the given Java long value.- Specified by:
setLongin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setFloat
Sets the designated parameter to the given Java float value.- Specified by:
setFloatin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setDouble
Sets the designated parameter to the given Java double value.- Specified by:
setDoublein interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setBigDecimal
Sets the designated parameter to the given Java java.math.BigDecimal value.- Specified by:
setBigDecimalin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setBigInteger
Sets the designated parameter to the given Java java.math.BigInteger value.- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setString
Sets the designated parameter to the given Java String value.- Specified by:
setStringin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setDate
Sets the designated parameter to the given java.sql.Date value, using the given Calendar object. The driver uses the Calendar object to calculate the date taking into account a custom timezone.- Specified by:
setDatein interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter valuecal- the Calendar object the driver will use to construct the date- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setTime
Sets the designated parameter to the given java.sql.Time value, using the given Calendar object. The driver uses the Calendar object to calculate the date taking into account a custom timezone.- Specified by:
setTimein interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter valuecal- the Calendar object the driver will use to construct the date- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setTimestamp
Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object. The driver uses the Calendar object to calculate the date taking into account a custom timezone.- Specified by:
setTimestampin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter valuecal- the Calendar object the driver will use to construct the date- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setDate
Sets the designated parameter to the given Java java.sql.Date value.- Specified by:
setDatein interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setTime
Sets the designated parameter to the given Java java.sql.Time value.- Specified by:
setTimein interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setTimestamp
Sets the designated parameter to the given Java java.sql.Timestamp value.- Specified by:
setTimestampin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setBytes
Sets the designated parameter to the given Java byte[] value.- Specified by:
setBytesin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setURL
Sets the designated parameter to the given Java java.net.URL value.- Specified by:
setURLin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setBlob
Sets the designated parameter to the given Java java.sql.Blob value.- Specified by:
setBlobin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setClob
Sets the designated parameter to the given Java java.sql.Clob value.- Specified by:
setClobin interfacePreparedStatement- Parameters:
parameterIndex- Parameter index (starts at 1)x- the parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
-
setClob
- Specified by:
setClobin interfacePreparedStatement- Throws:
SQLException
-
setClob
- Specified by:
setClobin interfacePreparedStatement- Throws:
SQLException
-
setNull
Sets the designated parameter to SQL NULL. This version of the method setNull is supposed to be used for user-defined types and REF type parameters. Because MonetDBe currently doesn't support UDFs, this behaves similarly to setNull(int parameterIndex, int sqlType).- Specified by:
setNullin interfacePreparedStatement- Throws:
SQLException- See Also:
setNull(int,int)
-
setNString
Similar to setString(int,String).- Specified by:
setNStringin interfacePreparedStatement- Throws:
SQLException- See Also:
setString(int,String)
-
setCharacterStream
Similar to setClob(int,Reader,long).- Specified by:
setCharacterStreamin interfacePreparedStatement- Throws:
SQLException- See Also:
setClob(int,Reader,long)
-
setCharacterStream
Similar to setClob(int,Reader,long).- Specified by:
setCharacterStreamin interfacePreparedStatement- Throws:
SQLException- See Also:
setClob(int,Reader,long)
-
setCharacterStream
Similar to setClob(int,Reader).- Specified by:
setCharacterStreamin interfacePreparedStatement- Throws:
SQLException- See Also:
setClob(int,Reader)
-
setNCharacterStream
Similar to setClob(int,Reader).- Specified by:
setNCharacterStreamin interfacePreparedStatement- Throws:
SQLException- See Also:
setClob(int,Reader)
-
setNCharacterStream
Similar to setClob(int,Reader,long).- Specified by:
setNCharacterStreamin interfacePreparedStatement- Throws:
SQLException- See Also:
setClob(int,Reader,long)
-
setAsciiStream
Feature not supported.- Specified by:
setAsciiStreamin interfacePreparedStatement- Throws:
SQLFeatureNotSupportedException- This feature is not supportedSQLException
-
setAsciiStream
Feature not supported.- Specified by:
setAsciiStreamin interfacePreparedStatement- Throws:
SQLFeatureNotSupportedException- This feature is not supportedSQLException
-
setAsciiStream
Feature not supported.- Specified by:
setAsciiStreamin interfacePreparedStatement- Throws:
SQLFeatureNotSupportedException- This feature is not supportedSQLException
-
setUnicodeStream
Feature not supported.- Specified by:
setUnicodeStreamin interfacePreparedStatement- Throws:
SQLFeatureNotSupportedException- This feature is not supportedSQLException
-
setBinaryStream
Feature not supported.- Specified by:
setBinaryStreamin interfacePreparedStatement- Throws:
SQLFeatureNotSupportedException- This feature is not supportedSQLException
-
setBinaryStream
Feature not supported.- Specified by:
setBinaryStreamin interfacePreparedStatement- Throws:
SQLFeatureNotSupportedException- This feature is not supportedSQLException
-
setBinaryStream
Feature not supported.- Specified by:
setBinaryStreamin interfacePreparedStatement- Throws:
SQLFeatureNotSupportedException- This feature is not supportedSQLException
-
setBlob
Feature not supported.- Specified by:
setBlobin interfacePreparedStatement- Throws:
SQLFeatureNotSupportedException- This feature is not supportedSQLException
-
setBlob
Feature not supported.- Specified by:
setBlobin interfacePreparedStatement- Throws:
SQLFeatureNotSupportedException- This feature is not supportedSQLException
-
setRef
Feature not supported.- Specified by:
setRefin interfacePreparedStatement- Throws:
SQLFeatureNotSupportedException- This feature is not supportedSQLException
-
setSQLXML
Feature not supported.- Specified by:
setSQLXMLin interfacePreparedStatement- Throws:
SQLFeatureNotSupportedException- This feature is not supportedSQLException
-
setArray
Feature not supported.- Specified by:
setArrayin interfacePreparedStatement- Throws:
SQLFeatureNotSupportedException- This feature is not supportedSQLException
-
setRowId
Feature not supported.- Specified by:
setRowIdin interfacePreparedStatement- Throws:
SQLFeatureNotSupportedException- This feature is not supportedSQLException
-
setNClob
Feature not supported.- Specified by:
setNClobin interfacePreparedStatement- Throws:
SQLFeatureNotSupportedException- This feature is not supportedSQLException
-
setNClob
Feature not supported.- Specified by:
setNClobin interfacePreparedStatement- Throws:
SQLFeatureNotSupportedException- This feature is not supportedSQLException
-
setNClob
Feature not supported.- Specified by:
setNClobin interfacePreparedStatement- Throws:
SQLFeatureNotSupportedException- This feature is not supportedSQLException
-