Class OracleSelectQueryResult

Description

Implements interfaces:

The OracleSelectQueryResult interface provides the functionality common to a Oracle SELECT query result.

For example, you can fetch associative arrays, advance the current row position, etc.

  • version: $Id: OracleSelectQueryResult.class.php,v 1.10 2007/09/05 21:39:00 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /harmoni/core/DBHandler/Oracle/OracleSelectQueryResult.class.php (line 23)


	
			
Variable Summary
mixed $_currentRow
mixed $_linkId
integer $_resourceId
Method Summary
object OracleSelectQueryResult OracleSelectQueryResult (integer $resourceId, integer $linkId)
boolean advanceRow ()
void bindField (string $field, ref $var)
mixed field (mixed $field)
void free ()
array getCurrentRow ([optional $arrayType = BOTH])
array getFieldNames ()
integer getNumberOfFields ()
integer getNumberOfRows ()
integer getResourceId ()
boolean hasMoreRows ()
boolean hasNext ()
boolean moveToRow (integer $rowNumber)
array next (optional 0)
void unbindField (string $field)
Variables
mixed $_currentRow (line 44)

An array storing three arrays (associative, numeric, and both) for the current row in the result.

integer $_currentRowIndex (line 37)

The index of the current row in the result.

The index of the current row in the result. The first row has an index of 0. The last row has an index of getNumberOfRows() - 1.

  • var: The index of the current row in the result.
mixed $_linkId (line 61)

The link identifier for the database connection.

The link identifier for the database connection.

  • access: private
integer $_resourceId (line 52)

The resource id for this SELECT query.

The resource id for this SELECT query.

  • var: The resource id for this SELECT query.
  • access: private
Methods
Constructor OracleSelectQueryResult (line 72)

Creates a new OracleSelectQueryResult object.

Creates a new OracleSelectQueryResult object.

  • return: A new OracleSelectQueryResult object.
  • access: public
object OracleSelectQueryResult OracleSelectQueryResult (integer $resourceId, integer $linkId)
  • integer $resourceId: The resource id for this SELECT query.
  • integer $linkId: The link identifier for the database connection.
advanceRow (line 147)

Advances the current row position.

Advances the current row position. If there are no more rows left, then it returns

  1. false
.

  • return: True, if successful; False, otherwise.
  • access: public
boolean advanceRow ()
bindField (line 301)

Binds the field specified by the first argument to the variable given as

the second argument. The method stores a reference to the variable represented by the second argument; whenever a new row is fetched, the value of the field in the new row will be updated in the referenced variable. This enables the user to avoid unnecessary calls to

  1. getCurrentRow()
or
  1. field()
.

  • access: public
void bindField (string $field, ref $var)
  • string $field: field The field to bind. This could be either a string value that would correspond to the field as returned by
    1. getFieldNames()
    , or an integer (less than
    1. getNumberOfFields()
    ) corresponding to the index of the field.
  • ref $var: mixed var The variable to be bound to the value of the field in the current row.
field (line 185)

Returns the specified field value in the current row.

Returns the specified field value in the current row.

  • return: The value that was requested.
  • access: public
mixed field (mixed $field)
  • mixed $field: The name or index of the field, whose value will be returned.
free (line 322)

Frees the memory for this result.

  • access: public
void free ()
getCurrentRow (line 227)

Returns an array that stores the current row in the result. The data can be accessed through associative indices as well as numeric indices.

  • return: An associative array of the current row.
  • access: public
array getCurrentRow ([optional $arrayType = BOTH])
  • optional $arrayType: integer arrayType Specifies what type of an array to return. Allowed values are: ASSOC, NUMERIC, and BOTH.
getFieldNames (line 214)

Returns an indexed array of all field names that were selected.

Returns an indexed array of all field names that were selected.

  • return: An array of all field names that were selected.
  • access: public
array getFieldNames ()
getNumberOfFields (line 203)

Get the number of fields that were selected by the SELECT query.

Get the number of fields that were selected by the SELECT query.

  • return: The number of fields.
  • access: public
integer getNumberOfFields ()
getNumberOfRows (line 248)

Returns the number of rows that the query processed.

Returns the number of rows that the query processed. For a SELECT query, this would be the total number of rows selected. For a DELETE, UPDATE, or INSERT query, this would be the number of rows that were affected.

  • return: Number of rows that were processed by the query.
integer getNumberOfRows ()
getResourceId (line 110)

Returns the resource id for this SELECT query.

Returns the resource id for this SELECT query. The resource id is returned by the Oracle_query() function.

  • return: The resource id for this SELECT query.
  • access: public
integer getResourceId ()
hasMoreRows (line 173)

Indicates if there are any remaining rows returned by the SELECT query.

Indicates if there are any remaining rows returned by the SELECT query. The current row does count as well.

  • return: True, if there are some rows left; False, otherwise.
  • access: public
boolean hasMoreRows ()
hasNext (line 121)

Indicates if there are any remaining rows returned by the SELECT query.

Indicates if there are any remaining rows returned by the SELECT query including the current row.

  • return: True, if there are some rows left; False, otherwise.
  • access: public
boolean hasNext ()
moveToRow (line 261)

Moves the internal row pointer to the specified position. The range of possible values is

  1. 0 - (getNumberOfRows()-1)
.

  • return:
    1. true
    , if operation was successful;
    1. false
    , otherwise.
  • access: public
boolean moveToRow (integer $rowNumber)
  • integer $rowNumber: rowNumber The number of the row to move to.
next (line 134)

Returns an array that stores the current row in the result and advances to the next row. The data can be accessed through associative indices as well as numeric indices.

  • return: An associative array of the current row.
  • access: public
array next (optional 0)
  • optional 0: integer arrayType Specifies what type of an array to return. Allowed values are: ASSOC, NUMERIC, and BOTH.
unbindField (line 313)

Unbinds the field that has been bound by

  1. bindField()
.

  • access: public
void unbindField (string $field)
  • string $field: field The field to unbind. This could be either a string value that would correspond to the field as returned by
    1. getFieldNames()
    , or an integer (less than
    1. getNumberOfFields()
    ) corresponding to the index of the field.

Documentation generated on Wed, 19 Sep 2007 10:25:20 -0400 by phpDocumentor 1.3.0RC3