| java.lang.Object org.jamwiki.db.WikiPreparedStatement
WikiPreparedStatement | public class WikiPreparedStatement (Code) | | This class is a wrapper around the java.sql.PreparedStatement class, allowing a
statement to be prepared without requiring that a database connection be
held. The main advantage of this approach is that all connection handling can
be done by low-level database functions, and the user can build and execute a
query without the need to ensure that the connection is properly closed after
the data is processed.
|
Method Summary | |
public WikiResultSet | executeQuery() | public WikiResultSet | executeQuery(Connection conn) | public int | executeUpdate() | public int | executeUpdate(Connection conn) | public void | setChar(int parameterIndex, char x) Sets the designated parameter to the given Java character value. | public void | setInt(int parameterIndex, int x) Sets the designated parameter to the given Java int value. | public void | setInt(int parameterIndex, long x) Sets the designated parameter to the given Java int value. | public void | setNull(int parameterIndex, int sqlType) Sets the designated parameter to SQL NULL. | public void | setString(int parameterIndex, String x) Sets the designated parameter to the given Java String value. | public void | setTimestamp(int parameterIndex, Timestamp x) Sets the designated parameter to the given java.sql.Timestamp value. |
WikiPreparedStatement | public WikiPreparedStatement(String sql)(Code) | | |
setChar | public void setChar(int parameterIndex, char x) throws Exception(Code) | | Sets the designated parameter to the given Java character value. The
driver converts this to an SQL CHAR value when it sends it to the database.
Parameters: parameterIndex - The first parameter is 1, the second is 2, ... Parameters: x - The parameter value. throws: Exception - If a parameter is invalid. |
setInt | public void setInt(int parameterIndex, int x) throws Exception(Code) | | Sets the designated parameter to the given Java int value. The driver
converts this to an SQL INTEGER value when it sends it to the database.
Parameters: parameterIndex - The first parameter is 1, the second is 2, ... Parameters: x - The parameter value. throws: Exception - If a parameter is invalid. |
setInt | public void setInt(int parameterIndex, long x) throws Exception(Code) | | Sets the designated parameter to the given Java int value. The driver
converts this to an SQL INTEGER value when it sends it to the database.
Parameters: parameterIndex - The first parameter is 1, the second is 2, ... Parameters: x - The parameter value. throws: Exception - If a parameter is invalid. |
setNull | public void setNull(int parameterIndex, int sqlType) throws Exception(Code) | | Sets the designated parameter to SQL NULL.
Note: You must specify the parameter's SQL type.
Parameters: parameterIndex - The first parameter is 1, the second is 2, ... Parameters: sqlType - The SQL type code defined in java.sql.Types throws: Exception - If a parameter is invalid. |
setString | public void setString(int parameterIndex, String x) throws Exception(Code) | | Sets the designated parameter to the given Java String value. The driver
converts this to an SQL VARCHAR or LONGVARCHAR value (depending on the
argument's size relative to the driver's limits on VARCHAR values) when
it sends it to the database.
Parameters: parameterIndex - The first parameter is 1, the second is 2, ... Parameters: x - The parameter value. throws: Exception - If a parameter is invalid. |
setTimestamp | public void setTimestamp(int parameterIndex, Timestamp x) throws Exception(Code) | | Sets the designated parameter to the given java.sql.Timestamp value. The
driver converts this to an SQL TIMESTAMP value when it sends it to the database.
Parameters: parameterIndex - The first parameter is 1, the second is 2, ... Parameters: x - The parameter value. throws: Exception - If a parameter is invalid. |
|
|