public class JdbcPreparedStatementResource extends JdbcStatementResource
Constructor and Description |
---|
JdbcPreparedStatementResource(JdbcConnectionResource conn)
Constructor for JdbcStatementResource
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
bindParams(Env env,
ColumnType[] types,
Value[] params)
Creates _types and _params array for this prepared statement.
|
protected boolean |
executeImpl(Env env) |
protected Value |
getParam(int i)
Returns a parameter value
Known subclasses: see PostgresStatement.execute
|
protected int |
getParamLength()
Returns the number of parameters available to binding
Known subclasses: see PostgresStatement.execute
|
protected java.sql.PreparedStatement |
getPreparedStatement()
Returns the internal prepared statement.
|
protected boolean |
isPreparable(java.lang.String query) |
int |
paramCount()
Counts the number of parameter markers in the query string.
|
boolean |
prepare(Env env,
java.lang.String query)
Prepares this statement with the given query.
|
protected boolean |
prepareForExecute(Env env) |
protected void |
setObject(int i,
java.lang.Object param)
Sets the given parameter
Known subclasses: see PostgresStatement.execute
|
protected void |
setPreparedStatement(java.sql.PreparedStatement stmt)
Changes the internal statement.
|
bindResults, close, createResultSet, dataSeek, execute, execute, fetch, freeResult, getColumnCount, getConnection, getErrorCode, getErrorMessage, getException, getFieldCount, getJavaConnection, getMetaData, getNumRows, getQuery, getResultSet, getStatementType, isFetchFieldIndexBeforeFieldName, lastInsertId, setError, setErrorCode, setErrorMessage, setQuery, setResultSet, setStatement, toString
public JdbcPreparedStatementResource(JdbcConnectionResource conn)
connV
- a JdbcConnectionResource connectionprotected boolean bindParams(Env env, ColumnType[] types, Value[] params)
types
- = string of i,d,s,b (ie: "idds")params
- = array of values (probably Vars)protected boolean prepareForExecute(Env env) throws java.sql.SQLException
prepareForExecute
in class JdbcStatementResource
java.sql.SQLException
protected boolean executeImpl(Env env) throws java.sql.SQLException
executeImpl
in class JdbcStatementResource
java.sql.SQLException
protected java.sql.PreparedStatement getPreparedStatement()
public int paramCount()
public boolean prepare(Env env, java.lang.String query)
query
- SQL queryprotected boolean isPreparable(java.lang.String query)
protected Value getParam(int i)
protected int getParamLength()
protected void setPreparedStatement(java.sql.PreparedStatement stmt)
protected void setObject(int i, java.lang.Object param) throws java.sql.SQLException
java.sql.SQLException