public class PDOStatement extends java.lang.Object implements java.lang.Iterable<Value>, EnvCleanup
Modifier and Type | Field and Description |
---|---|
java.lang.String |
queryString |
Modifier | Constructor and Description |
---|---|
protected |
PDOStatement(Env env,
PDO pdo,
PDOError error) |
Modifier and Type | Method and Description |
---|---|
boolean |
bindColumn(Env env,
Value column,
Value var,
int type) |
boolean |
bindParam(Env env,
Value parameter,
Value value,
int dataType,
int length,
Value driverOptions) |
boolean |
bindValue(Env env,
Value parameter,
Value value,
int dataType) |
void |
cleanup()
Implements the EnvCleanup interface.
|
boolean |
close() |
boolean |
closeCursor(Env env)
Closes the current cursor.
|
int |
columnCount(Env env)
Returns the number of columns.
|
java.lang.String |
errorCode(Env env) |
ArrayValue |
errorInfo() |
protected static PDOStatement |
execute(Env env,
PDO pdo,
PDOError error,
java.lang.String query,
boolean isCatchException) |
boolean |
execute(Env env,
Value inputParameters)
Execute the statement.
|
Value |
fetch(Env env,
int fetchMode,
int cursorOrientation,
int cursorOffset)
Fetch the next row.
|
Value |
fetchAll(Env env,
int fetchMode,
int columnIndex) |
Value |
fetchColumn(Env env,
int column) |
Value |
fetchObject(Env env,
java.lang.String className,
Value[] args) |
Value |
getAttribute(Env env,
int attribute) |
Value |
getColumnMeta(Env env,
int column) |
protected JdbcStatementResource |
getStatement() |
java.util.Iterator<Value> |
iterator()
Returns an iterator of the values.
|
boolean |
nextRowset() |
protected static PDOStatement |
prepare(Env env,
PDO pdo,
PDOError error,
java.lang.String query,
boolean isCatchException) |
int |
rowCount(Env env) |
boolean |
setAttribute(Env env,
int attribute,
Value value) |
boolean |
setAttribute(Env env,
int attribute,
Value value,
boolean isFromConstructor) |
protected void |
setError(Env env,
java.sql.SQLException e) |
boolean |
setFetchMode(Env env,
int fetchMode,
Value[] args)
Sets the fetch mode, the default is
PDO.FETCH_BOTH . |
java.lang.String |
toString() |
protected static PDOStatement prepare(Env env, PDO pdo, PDOError error, java.lang.String query, boolean isCatchException) throws java.sql.SQLException
java.sql.SQLException
protected static PDOStatement execute(Env env, PDO pdo, PDOError error, java.lang.String query, boolean isCatchException) throws java.sql.SQLException
java.sql.SQLException
protected JdbcStatementResource getStatement()
public boolean bindParam(Env env, Value parameter, Value value, int dataType, int length, Value driverOptions)
public boolean closeCursor(Env env)
public int columnCount(Env env)
public boolean close()
public void cleanup()
cleanup
in interface EnvCleanup
public java.lang.String errorCode(Env env)
public ArrayValue errorInfo()
protected void setError(Env env, java.sql.SQLException e)
public boolean execute(Env env, Value inputParameters)
inputParameters
- an array containing input values to correspond to
the bound parameters for the statement.public Value fetch(Env env, int fetchMode, int cursorOrientation, int cursorOffset)
fetchMode
- the mode, 0 to use the value
set by setFetchMode(com.caucho.quercus.env.Env, int, com.caucho.quercus.env.Value[])
.public Value fetchAll(Env env, int fetchMode, int columnIndex)
fetchMode
- columnIndex
- 0-based column index when fetchMode is FETCH_BOTHpublic Value fetchColumn(Env env, int column)
column
- 0-based column numberpublic Value getColumnMeta(Env env, int column)
column
- 0-based column indexpublic java.util.Iterator<Value> iterator()
iterator
in interface java.lang.Iterable<Value>
public boolean nextRowset()
public int rowCount(Env env)
public boolean setAttribute(Env env, int attribute, Value value, boolean isFromConstructor)
public boolean setFetchMode(Env env, int fetchMode, Value[] args)
PDO.FETCH_BOTH
.public java.lang.String toString()
toString
in class java.lang.Object