|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.quercus.lib.db.JdbcStatementResource
public class JdbcStatementResource
Represents a JDBC Statement value.
| Constructor Summary | |
|---|---|
JdbcStatementResource(JdbcConnectionResource connV)
Constructor for JdbcStatementResource |
|
| Method Summary | |
|---|---|
protected boolean |
bindParams(Env env,
java.lang.String types,
Value[] params)
Creates _types and _params array for this prepared statement. |
boolean |
bindResults(Env env,
Value[] outParams)
Associate (bind) columns in the result set to variables. |
void |
close()
Closes the result set, if any, and closes this statement. |
protected boolean |
dataSeek(int offset)
Advance the cursor the number of rows given by offset. |
int |
errorCode()
Returns the error number for the last error. |
java.lang.String |
errorMessage()
Returns the error message for the last error. |
boolean |
execute(Env env)
Executes a prepared Query. |
protected boolean |
executeStatement()
Executes underlying statement Known subclasses: see PostgresStatement.execute |
Value |
fetch(Env env)
Fetch results from a prepared statement into bound variables. |
boolean |
freeResult()
Frees the associated result. |
int |
getFieldCount()
Returns the number of fields in the result set. |
protected java.sql.Connection |
getJavaConnection()
Returns the underlying SQL connection associated to this statement. |
protected java.sql.ResultSetMetaData |
getMetaData()
Returns the meta data for corresponding to the current result set. |
int |
getNumRows()
Returns the number of rows in the result set. |
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. |
JdbcResultResource |
getResultMetadata()
Resets _fieldOffset in _resultResource |
protected java.sql.ResultSet |
getResultSet()
Returns the internal result set. |
java.lang.String |
getStatementType()
Returns this statement type. |
int |
paramCount()
Counts the number of parameter markers in the query string. |
boolean |
prepare(Env env,
StringValue query)
Prepares this statement with the given query. |
boolean |
prepareStatement(Env env,
java.lang.String query)
Prepares statement with the given query. |
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. |
protected void |
setResultSet(java.sql.ResultSet rs)
Changes the internal result set. |
java.lang.String |
toString()
Returns a string representation for this object. |
JdbcConnectionResource |
validateConnection()
Validates the connection resource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JdbcStatementResource(JdbcConnectionResource connV)
connV - a JdbcConnectionResource connection| Method Detail |
|---|
protected boolean bindParams(Env env,
java.lang.String types,
Value[] params)
types - = string of i,d,s,b (ie: "idds")params - = array of values (probably Vars)
public boolean bindResults(Env env,
Value[] outParams)
env - the PHP executing environmentoutParams - the output variables
public void close()
protected boolean dataSeek(int offset)
offset - the number of rows to move the cursor
public int errorCode()
public java.lang.String errorMessage()
public boolean execute(Env env)
env - the PHP executing environment
protected boolean executeStatement()
throws java.sql.SQLException
java.sql.SQLExceptionpublic Value fetch(Env env)
public boolean freeResult()
protected java.sql.ResultSetMetaData getMetaData()
throws java.sql.SQLException
java.sql.SQLException
public int getNumRows()
throws java.sql.SQLException
java.sql.SQLExceptionprotected java.sql.PreparedStatement getPreparedStatement()
public JdbcResultResource getResultMetadata()
protected java.sql.ResultSet getResultSet()
protected java.sql.Connection getJavaConnection()
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String getStatementType()
public int paramCount()
public boolean prepare(Env env,
StringValue query)
query - SQL query
public boolean prepareStatement(Env env,
java.lang.String query)
query - SQL query
protected Value getParam(int i)
protected int getParamLength()
protected void setPreparedStatement(java.sql.PreparedStatement stmt)
protected void setResultSet(java.sql.ResultSet rs)
public int getFieldCount()
env - the PHP executing environment
protected void setObject(int i,
java.lang.Object param)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic JdbcConnectionResource validateConnection()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||