| Modifier and Type | Field and Description |
|---|---|
| private Activation | |
| private BrokeredConnectionControl | |
| private String | |
| protected PreparedStatement | |
| protected ResultSetMetaData | |
| private Boolean | usePreTenFiveHdrFormat
Tells which header format to use when writing CLOBs into the store. |
| Access | Constructor and Description |
|---|---|
| public | EmbedPreparedStatement(EmbedConnection conn, String sql, boolean forMetaData, int resultSetType, int resultSetConcurrency, int resultSetHoldability, int autoGeneratedKeys, int[] columnIndexes, String[] columnNames)
Constructor assumes caller will setup context stack and restore it. |
| Modifier and Type | Method and Description |
|---|---|
| public final void | addBatch(String
typically this is a SQL sql)INSERT or
UPDATE statementOverrides org. Implements java. Adds the given SQL command to the current list of commands for this
|
| public void | addBatch()
Implements java. JDBC 2.0 Add a set of parameters to the batch. |
| private final void | checkAsciiStreamConditions(int
1-based index of the parameter. parameterIndex)Check general preconditions for setAsciiStream methods. |
| private final void | checkBinaryStreamConditions(int
1-based index of the parameter. parameterIndex)Check general preconditions for setBinaryStream methods. |
| private final void | checkBlobConditions(int
1-based index of the parameter. parameterIndex)Check general (pre)conditions for setBlob methods. |
| private final void | checkCharacterStreamConditions(int
1-based index of the parameter. parameterIndex)Check general preconditions for setCharacterStream methods. |
| private final void | checkClobConditions(int
1-based index of the parameter. parameterIndex)Check general (pre)conditions for setClob methods. |
| private void | checkStatementValidity(SQLException sqle)
Method calls onStatementError occurred on the BrokeredConnectionControl class after checking the SQLState of the SQLException thrown. |
| public void | clearParameters()
Implements java. In general, parameter values remain in force for repeated use of a Statement. |
| pack-priv void | closeActions()
Overrides org. Additional close to close our activation. |
| pack-priv final SQLException | |
| public final boolean | execute(String
any SQL statement sql)Overrides org. Implements java. Executes the given SQL statement, which may return multiple results. |
| public final boolean | execute(String
any SQL statement sql, int a constant indicating whether auto-generated
keys should be made available for retrieval using the method
autoGenKeys)getGeneratedKeys; one of the following constants:
Statement.RETURN_GENERATED_KEYS or
Statement.NO_GENERATED_KEYSOverrides org. Implements java. Executes the given SQL statement, which may return multiple results, and signals the driver that any auto-generated keys should be made available for retrieval. |
| public final boolean | execute(String
any SQL statement sql, int[] an array of the indexes of the columns in the
inserted row that should be made available for retrieval by a
call to the method columnIndexes)getGeneratedKeysOverrides org. Implements java. Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. |
| public final boolean | execute(String
any SQL statement sql, String[] an array of the names of the columns in the inserted
row that should be made available for retrieval by a call to the
method columnNames)getGeneratedKeysOverrides org. Implements java. Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. |
| public final boolean | execute()
Implements java. Executes the SQL statement in this |
| pack-priv boolean | executeBatchElement(Object batchElement)
Overrides org. Execute a single element of the batch. |
| public final long | executeLargeUpdate()
Implements org. Execute a SQL INSERT, UPDATE or DELETE statement. |
| public final ResultSet | executeQuery(String
an SQL statement to be sent to the database, typically a
static SQL sql)SELECT statementOverrides org. Implements java. Executes the given SQL statement, which returns a single
|
| public final ResultSet | Returns: a ResultSet that contains the data produced by the query; never nullImplements java. A prepared SQL query is executed and its ResultSet is returned. |
| pack-priv boolean | executeStatement(Activation a, boolean executeQuery, boolean executeUpdate)
Overrides org. Execute the current statement. |
| public final int | executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as sql)INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.Overrides org. Implements java. Executes the given SQL statement, which may be an |
| public final int | executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as sql, int INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.a flag indicating whether auto-generated keys
should be made available for retrieval;
one of the following constants:
autoGenKeys)Statement.RETURN_GENERATED_KEYS
Statement.NO_GENERATED_KEYSOverrides org. Implements java. Executes the given SQL statement and signals the driver with the
given flag about whether the
auto-generated keys produced by this |
| public final int | executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as sql, int[] INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.an array of column indexes indicating the columns
that should be returned from the inserted row columnIndexes)Overrides org. Implements java. Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. |
| public final int | executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as sql, String[] INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.an array of the names of the columns that should be
returned from the inserted row columnNames)Overrides org. Implements java. Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. |
| public final int | Returns: either the row count for INSERT, UPDATE or DELETE; or 0 for SQL statements that return nothingImplements java. Execute a SQL INSERT, UPDATE or DELETE statement. |
| protected void | finalize()
Overrides org. JDBC states that a Statement is closed when garbage collected. |
| public ResultSetMetaData | Returns: the description of a ResultSet's columnsImplements java. JDBC 2.0 The number, types and properties of a ResultSet's columns are provided by the getMetaData method. |
| protected int | |
| public final ParameterMetaData | Returns: a ParameterMetaData object that contains information about the number, types and properties of this PreparedStatement object's parameters.Implements java. JDBC 3.0 Retrieves the number, types and properties of this PreparedStatement object's parameters. |
| protected final String | Returns: SQL name of the parameterthe 1-based index of the parameter parameterIndex)Return the SQL type name for the parameter. |
| public final ParameterValueSet | Returns: The ParameterValueSet for the activationGet the ParameterValueSet from the activation. |
| public final long | getVersionCounter()
Implements org. Get the version of the prepared statement. |
| protected EmbedResultSetMetaData | |
| public final void | setArray(int
the first parameter is 1, the second is 2, ... i, Array an object representing an SQL array x)Implements java. JDBC 2.0 Set an Array parameter. |
| public final void | setAsciiStream(int
the first parameter is 1, the second is 2, ... parameterIndex, InputStream the java input stream which contains the ASCII parameter value x, long the number of bytes in the stream length)Implements java. We do this inefficiently and read it all in here. |
| public final void | setAsciiStream(int
the first parameter is 1, the second is 2, ... parameterIndex, InputStream the java input stream which contains the ASCII parameter value x, int the number of bytes in the stream length)Implements java. We do this inefficiently and read it all in here. |
| public void | setAsciiStream(int
the first parameter is 1, the second is 2, ... parameterIndex, InputStream the Java input stream that contains the ASCII parameter value x)Implements java. Sets the designated parameter to the given input stream. |
| public final void | setBigDecimal(int
the first parameter is 1, the second is 2, ... parameterIndex, BigDecimal the parameter value x)Implements java. Set a parameter to a java.lang.BigDecimal value. |
| public void | setBinaryStream(int
the first parameter is 1, the second is 2, ... parameterIndex, InputStream the java input stream which contains the binary parameter value x)Implements java. Sets the designated parameter to the given input stream. |
| public final void | setBinaryStream(int
the first parameter is 1, the second is 2, ... parameterIndex, InputStream the java input stream which contains the binary parameter value x, long the number of bytes in the stream length)Implements java. sets the parameter to the Binary stream |
| public final void | setBinaryStream(int
the first parameter is 1, the second is 2, ... parameterIndex, InputStream the java input stream which contains the binary parameter value x, int the number of bytes in the stream length)Implements java. sets the parameter to the binary stream |
| private void | setBinaryStreamInternal(int
the 1-based index of the parameter to set. parameterIndex, InputStream the data. x, final boolean tells whether we know the length of the data or not. lengthLess, long the length of the data. Ignored if length)lengthLess
is true.Set the given stream for the specified parameter. |
| public void | setBlob(int
the first parameter is 1, the second is 2, ... i, Blob an object representing a BLOB x)Implements java. JDBC 2.0 Set a BLOB parameter. |
| public void | setBlob(int
index of the first parameter is 1, the second is
2, ... parameterIndex, InputStream an object that contains the data to set the parameter
value to. inputStream)Implements java. Sets the designated parameter to a |
| public void | setBlob(int
index of the first parameter is 1,
the second is 2, ... parameterIndex, InputStream An object that contains the data to set the parameter
value to. inputStream, long the number of bytes in the parameter data. length)Implements java. Sets the designated parameter to a InputStream object. |
| public void | setBoolean(int
the first parameter is 1, the second is 2, ... parameterIndex, boolean the parameter value x)Implements java. Set a parameter to a Java boolean value. |
| public void | setBrokeredConnectionControl(BrokeredConnectionControl
used to call the onStatementClose and
onStatementErrorOccurred methods that have logic to
raise StatementEvents for the close and error events
on the PreparedStatement control)This method is used to initialize the BrokeredConnectionControl variable with its implementation. |
| public void | setByte(int
the first parameter is 1, the second is 2, ... parameterIndex, byte the parameter value x)Implements java. Set a parameter to a Java byte value. |
| public void | setBytes(int
the first parameter is 1, the second is 2, ... parameterIndex, byte[] the parameter value x)Implements java. Set a parameter to a Java array of bytes. |
| public final void | setCharacterStream(int
the first parameter is 1, the second is 2, ... parameterIndex, Reader the java reader which contains the UNICODE data reader, long the number of characters in the stream length)Implements java. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader. |
| public final void | setCharacterStream(int
the first parameter is 1, the second is 2, ... parameterIndex, Reader the java reader which contains the UNICODE data reader, int the number of characters in the stream length)Implements java. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader. |
| public void | setCharacterStream(int
the first parameter is 1, the second is 2, ... parameterIndex, Reader the reader)java.io.Reader object that contains the
Unicode dataImplements java. Sets the designated parameter to the given |
| private void | setCharacterStreamInternal(int
the 1-based index of the parameter to set. parameterIndex, Reader the data. reader, final boolean tells whether we know the length of the data or not. lengthLess, long the length of the data. Ignored if length)lengthLess
is true.Set the given character stream for the specified parameter. |
| public void | setClob(int
the first parameter is 1, the second is 2, ... i, Clob an object representing a CLOB x)Implements java. JDBC 2.0 Set a CLOB parameter. |
| public void | setClob(int
index of the first parameter is 1, the second is
2, ... parameterIndex, Reader an object that contains the data to set the parameter
value to. reader)Implements java. Sets the designated parameter to a |
| public void | setClob(int
index of the first parameter is 1, the second is 2, ... parameterIndex, Reader An object that contains the data to set the parameter value to. reader, long the number of characters in the parameter data. length)Implements java. Sets the designated parameter to a Reader object. |
| public void | setDate(int
the first parameter is 1, the second is 2, ... parameterIndex, Date the parameter value x)Implements java. Set a parameter to a java.sql.Date value. |
| public final void | setDate(int
the first parameter is 1, the second is 2, ... parameterIndex, Date the parameter value x, Calendar the cal)Calendar object the driver will use
to construct the dateImplements java. Set a parameter to a java.sql.Date value. |
| public void | setDouble(int
the first parameter is 1, the second is 2, ... parameterIndex, double the parameter value x)Implements java. Set a parameter to a Java double value. |
| public void | setFloat(int
the first parameter is 1, the second is 2, ... parameterIndex, float the parameter value x)Implements java. Set a parameter to a Java float value. |
| public void | setInt(int
the first parameter is 1, the second is 2, ... parameterIndex, int the parameter value x)Implements java. Set a parameter to a Java int value. |
| public void | setLong(int
the first parameter is 1, the second is 2, ... parameterIndex, long the parameter value x)Implements java. Set a parameter to a Java long value. |
| public final void | setNCharacterStream(int
of the first parameter is 1, the second is 2, ... parameterIndex, Reader the parameter value value)Implements java. Sets the designated parameter to a |
| public final void | setNCharacterStream(int
of the first parameter is 1, the second is 2, ... index, Reader the parameter value value, long the number of characters in the parameter data. length)Implements java. Sets the designated parameter to a |
| public final void | setNClob(int
index of the first parameter is 1, the second is 2, ... parameterIndex, Reader An object that contains the data to set the parameter value to. reader)Implements java. Sets the designated parameter to a |
| public final void | setNClob(int
of the first parameter is 1, the second is 2, ... index, NClob the parameter value value)Implements java. Sets the designated parameter to a |
| public final void | setNClob(int
index of the first parameter is 1, the second is 2, ... parameterIndex, Reader An object that contains the data to set the parameter value to. reader, long the number of characters in the parameter data. length)Implements java. Sets the designated parameter to a |
| public final void | setNString(int
of the first parameter is 1, the second is 2, ... index, String the parameter value value)Implements java. Sets the designated parameter to the given |
| public void | setNull(int
the first parameter is 1, the second is 2, ... parameterIndex, int SQL type code defined by java.sql.Types sqlType)Implements java. Set a parameter to SQL NULL. |
| public void | setNull(int
the first parameter is 1, the second is 2, ... paramIndex, int a value from sqlType, String java.sql.Typesthe fully-qualified name of an SQL user-defined type;
ignored if the parameter is not a user-defined type or REF typeName)Implements java. JDBC 2.0
Sets the designated parameter to SQL |
| public final void | setObject(int
The first parameter is 1, the second is 2, ... parameterIndex, Object The object containing the input parameter value x, int The SQL type (as defined in java.sql.Types) to be
sent to the database. The scale argument may further qualify this type. targetSqlType, int For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types
this is the number of digits after the decimal. For all other
types this value will be ignored, scale)Implements java. The interface says that the type of the Object parameter must be compatible with the type of the targetSqlType. |
| public final void | setObject(int
the first parameter is 1, the second is 2, ... parameterIndex, Object the object containing the input parameter value x, int the SQL type (as defined in java.sql.Types) to be
sent to the database targetSqlType)Implements java. This method is like setObject above, but assumes a scale of zero. |
| public final void | setObject(int
The first parameter is 1, the second is 2, ... parameterIndex, Object The object containing the input parameter value x)Implements java. Set the value of a parameter using an object; use the java.lang equivalent objects for integral values. |
| public final void | setRef(int
the first parameter is 1, the second is 2, ... i, Ref an object representing data of an SQL REF Type x)Implements java. JDBC 2.0 Set a REF(<structured-type>) parameter. |
| public final void | setRowId(int
the first parameter is 1, the second is 2, ... parameterIndex, RowId the parameter value x)Implements java. Sets the designated parameter to the given |
| private void | setScale(int
The first parameter is 1, the second is 2, ... parameterIndex, int The scale scale)Set the scale of a parameter. |
| public void | setShort(int
the first parameter is 1, the second is 2, ... parameterIndex, short the parameter value x)Implements java. Set a parameter to a Java short value. |
| public final void | setSQLXML(int
index of the first parameter is 1, the second is 2, ... parameterIndex, SQLXML a xmlObject)SQLXML object that maps an SQL XML valueImplements java. Sets the designated parameter to the given |
| public void | setString(int
the first parameter is 1, the second is 2, ... parameterIndex, String the parameter value x)Implements java. Set a parameter to a Java String value. |
| public void | setTime(int
the first parameter is 1, the second is 2, ... parameterIndex, Time the parameter value x)Implements java. Set a parameter to a java.sql.Time value. |
| public final void | setTime(int
the first parameter is 1, the second is 2, ... parameterIndex, Time the parameter value x, Calendar the cal)Calendar object the driver will use
to construct the timeImplements java. Set a parameter to a java.sql.Time value. |
| public void | setTimestamp(int
the first parameter is 1, the second is 2, ... parameterIndex, Timestamp the parameter value x)Implements java. Set a parameter to a java.sql.Timestamp value. |
| public final void | setTimestamp(int
the first parameter is 1, the second is 2, ... parameterIndex, Timestamp the parameter value x, Calendar the cal)Calendar object the driver will use
to construct the timestampImplements java. Set a parameter to a java.sql.Timestamp value. |
| public void | setUnicodeStream(int
the first parameter is 1, the second is 2, ... parameterIndex, InputStream the java input stream which contains the
UNICODE parameter value x, int the number of bytes in the stream length)Implements java.
Deprecated
Deprecated in JDBC 3.0 |
| public final void | setURL(int
- the first parameter is 1, the second is 2, ... parameterIndex, URL - the java.net.URL object to be set x)Implements java. JDBC 3.0 Sets the designated parameter to the given java.net.URL value. |
| public String | |
| public void | |
| private Boolean | Returns: true if the pre Derby 10.5 header format is to be used,
false if the new header format can be used (10.5 or newer)Determines which header format to use for CLOBs when writing them to the store. |