|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.quercus.lib.db.JdbcResultResource
com.caucho.quercus.lib.db.MysqliResult
public class MysqliResult
mysqli object oriented API facade
| Field Summary |
|---|
| Fields inherited from class com.caucho.quercus.lib.db.JdbcResultResource |
|---|
_metaData, _rs, BLOB, DATE, DATETIME, FETCH_ASSOC, FETCH_BOTH, FETCH_NUM, INTEGER, REAL, STRING, TIME, TIMESTAMP, UNKNOWN, YEAR |
| Constructor Summary | |
|---|---|
MysqliResult(Env env,
java.sql.ResultSetMetaData metaData,
Mysqli conn)
Constructor for MysqliResult |
|
MysqliResult(Env env,
java.sql.Statement stmt,
java.sql.ResultSet rs,
Mysqli conn)
Constructor for MysqliResult |
|
| Method Summary | |
|---|---|
boolean |
data_seek(Env env,
int rowNumber)
Seeks to an arbitrary result pointer specified by the offset in the result set represented by result. |
ArrayValue |
fetch_array(Env env,
int type)
Fetch a result row as an associative, a numeric array, or both. |
ArrayValue |
fetch_assoc(Env env)
Returns an associative array representing the row. |
Value |
fetch_field_direct(Env env,
int offset)
Returns field metadata for a single field. |
Value |
fetch_field(Env env)
Returns the next field in the result set. |
Value |
fetch_fields(Env env)
Returns metadata for all fields in the result set. |
Value |
fetch_lengths()
Returns the lengths of the columns of the current row in the result set. |
Value |
fetch_object(Env env)
Returns an object representing the current row. |
ArrayValue |
fetch_row(Env env)
Returns a numerical array representing the current row. |
protected Value |
fetchFieldDirect(Env env,
int fieldOffset)
returns an object containing the following field information: name: The name of the column orgname: The original name if an alias was specified table: The name of the table orgtable: The original name if an alias was specified def: default value for this field, represented as a string max_length: The maximum width of the field for the result set flags: An integer representing the bit-flags for the field (see _constMap). |
protected Value |
fetchFieldImproved(Env env,
int fieldLength,
java.lang.String name,
java.lang.String originalName,
java.lang.String table,
int jdbcType,
java.lang.String mysqlType,
int scale)
Returns an object with the following fields: name: The name of the column orgname: The original name if an alias was specified table: The name of the table orgtable: The original name if an alias was specified def: default value for this field, represented as a string max_length: The maximum width of the field for the result set flags: An integer representing the bit-flags for the field type: An integer respresenting the data type used for this field decimals: The number of decimals used (for integer fields) |
protected Value |
fetchFieldImproved(Env env,
java.sql.ResultSetMetaData md,
int offset)
|
protected Value |
fetchNextField(Env env)
|
int |
field_count(Env env)
Returns the number of fields in the result set. |
boolean |
field_seek(Env env,
int offset)
Sets the field metadata cursor to the given offset. |
int |
field_tell(Env env)
Get current field offset of a result pointer. |
void |
free_result()
Closes the result |
void |
free()
Closes the result. |
Value |
getFieldDirectArray(Env env)
|
Value |
getFieldFlagsImproved(Env env,
int jdbcType,
java.lang.String mysqlType)
Returns the following field flags: not_null, primary_key, multiple_key, blob, unsigned zerofill, binary, enum, auto_increment and timestamp it does not return the MySQL / PHP flag unique_key MysqlModule generates a special result set with the appropriate values |
protected java.lang.String |
getFieldType(int fieldOffset,
int jdbcType)
Given the JDBC type of the field at the given offset, return a PHP type string. |
protected java.lang.String |
getMysqlType(int fieldOffset)
Get Mysql type string |
java.lang.String |
getResourceType()
|
boolean |
isLastSqlDescribe()
|
int |
num_fields()
Get the number of fields in the result set. |
int |
num_rows()
Get the number of rows in the result set. |
| Methods inherited from class com.caucho.quercus.lib.db.JdbcResultResource |
|---|
close, fetchArray, fetchAssoc, fetchField, fetchObject, fetchRow, getAffectedRows, getColumnDate, getColumnNumber, getColumnNumber, getColumnTime, getColumnTimestamp, getColumnValue, getConnection, getFieldCatalog, getFieldCount, getFieldLength, getFieldName, getFieldNameAlias, getFieldNotNull, getFieldOffset, getFieldScale, getFieldSchema, getFieldTable, getFieldType, getJavaStatement, getJdbcType, getLengths, getMetaData, getNumFields, getNumRows, getNumRows, getResultField, getResultSet, getStatement, isInResultString, isValidFieldOffset, seek, setAffectedRows, setFieldOffset, setRowNumber, setRowNumber, toKey, toString, validateResult |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MysqliResult(Env env,
java.sql.Statement stmt,
java.sql.ResultSet rs,
Mysqli conn)
stmt - the corresponding statementrs - the corresponding result setconn - the corresponding connection
public MysqliResult(Env env,
java.sql.ResultSetMetaData metaData,
Mysqli conn)
metaData - the corresponding result set meta dataconn - the corresponding connection| Method Detail |
|---|
public java.lang.String getResourceType()
public boolean isLastSqlDescribe()
public boolean data_seek(Env env,
int rowNumber)
env - the PHP executing environmentrowNumber - the row offset
public ArrayValue fetch_array(Env env,
int type)
type - one of MYSQLI_ASSOC, MYSQLI_NUM, or MYSQLI_BOTH (default)
By using the MYSQLI_ASSOC constant this function will behave
identically to the mysqli_fetch_assoc(), while MYSQLI_NUM will
behave identically to the mysqli_fetch_row() function. The final
option MYSQLI_BOTH will create a single array with the attributes
of both.
public ArrayValue fetch_assoc(Env env)
public Value fetch_field_direct(Env env,
int offset)
env - the PHP executing environmentoffset - the field number
public Value fetch_field(Env env)
env - the PHP executing environment
public Value fetch_fields(Env env)
env - the PHP executing environment
public Value fetch_lengths()
public Value fetch_object(Env env)
env - the PHP executing environment
public ArrayValue fetch_row(Env env)
public int field_count(Env env)
env - the PHP executing environment
protected Value fetchFieldDirect(Env env,
int fieldOffset)
env - the PHP executing environmentfieldOffset - 0 <= fieldOffset < number of fields
protected Value fetchFieldImproved(Env env,
java.sql.ResultSetMetaData md,
int offset)
protected Value fetchFieldImproved(Env env,
int fieldLength,
java.lang.String name,
java.lang.String originalName,
java.lang.String table,
int jdbcType,
java.lang.String mysqlType,
int scale)
env - the PHP executing environmentfieldLength - the field length as defined in the table declaration.name - the field nameoriginalName - the field original nametable - the field table nametype - the field typescale - the field scale
public Value getFieldFlagsImproved(Env env,
int jdbcType,
java.lang.String mysqlType)
protected java.lang.String getMysqlType(int fieldOffset)
fieldOffset - the field number (0-based)
protected java.lang.String getFieldType(int fieldOffset,
int jdbcType)
getFieldType in class JdbcResultResourceprotected Value fetchNextField(Env env)
env - the PHP executing environment
fetchFieldDirect
increments the fieldOffset counter by one;
public boolean field_seek(Env env,
int offset)
env - the PHP executing environment
public int field_tell(Env env)
env - the PHP executing environment
public void free()
public void free_result()
public Value getFieldDirectArray(Env env)
env - the PHP executing environment
public int num_fields()
public int num_rows()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||