WACT_DB
[ class tree: WACT_DB ] [ index: WACT_DB ] [ all elements ]

Class: MySqlRecordSet

Source Location: /framework/db/drivers/mysql.inc.php

http://wact.sourceforge.net/index.php/RecordSet

PagedDataSet

RecordSet

Class Overview

DataSpace
   |
   --MySqlRecord
      |
      --MySqlRecordSet

Encapsulates the cursor result of a SELECT, SHOW, DESCRIBE or EXPLAIN sql statement.

Variables

Methods


Inherited Variables

Inherited Methods

Class: MySqlRecord

MySqlRecord::MySqlRecord()
Conecruct a record
MySqlRecord::buildAssignmentSQL()
Build SQL fragment to assign values to columns
MySqlRecord::getAffectedRowCount()
Gets the number of rows changed by an insert, delete or update query.
MySqlRecord::insert()
INSERTs the values of this record into a single table the field list parameter allows expressions to defined in the sql statements as well as field values defined in the record.
MySqlRecord::insertId()
INSERT a record into a table with a primary key represented by a auto_increment/serial column and return the primary key of the inserted record.
MySqlRecord::update()
Performs an UPDATE on a single table

Class: DataSpace

DataSpace::export()
Returns a reference to the complete array of properties stored
DataSpace::get()
Gets a copy of a stored property by name
DataSpace::getPath()
Gets a property value by navagating a dot separated path that dereferences elements within the dataspace.
DataSpace::getPropertyList()
Return a unique list of available properties This method is probably going to have capitalization problems.
DataSpace::hasProperty()
Has a value been assigned under this name for this dataspace?
DataSpace::import()
replaces the current properties of this dataspace with the proprties and values passed as a parameter
DataSpace::isDataSource()
Any class that implements the DataSource interface should implement this method This is a PHP4 way of detecting which objects implement the interface.
DataSpace::makeDataSpace()
Static method to convert a variable into a dataspace.
DataSpace::merge()
Append a new list of values to the DataSpace.
DataSpace::prepare()
Prepares the dataspace, executing the doFilter() method of the registered filter, if one exists
DataSpace::registerFilter()
Registers a filter with the dataspace.
DataSpace::remove()
removes stored property value
DataSpace::removeAll()
removes all property values
DataSpace::set()
Stores a copy of value into a Property
DataSpace::setPath()
Stores a copy of value into a Property based on a dot separated path.

Class Details

Encapsulates the cursor result of a SELECT, SHOW, DESCRIBE or EXPLAIN sql statement.

Implements the Iterator interface. implements RecordSet and PagedDataSet interfaces

access:  public
see:  http://wact.sourceforge.net/index.php/RecordSet
see:  PagedDataSet
see:  RecordSet

Class Variables


$pager =

Pager
var:  current pager for this query.
access:  private
Type:   The

$Query =

SQL Statement
access:  private
Type:   string

$QueryId =

MySQL query resource
access:  private
Type:   resource

Class Methods


constructor MySqlRecordSet

Construct a record set.

void MySqlRecordSet( object $Connection, string $Query_String)

API Tags:

access:  public

Parameters:

object   $Connection   MySQL Connection
string   $Query_String   SQL SELECT, SHOW, DESCRIBE, or EXPLAIN statement

method freeQuery

Frees up the Query resource.

can be called even if no resource is set or if has already been freed.



void freeQuery( )

API Tags:

access:  private

method getRowCount

Returns the number of rows in a query

int getRowCount( )

API Tags:

return:  number of rows
access:  public

method getTotalRowCount

Returns the total number of rows that a query would return, ignoring paging restrictions.

Query re-writing based on _adodb_getcount.



int getTotalRowCount( )

API Tags:

return:  number of rows
access:  public

method next

Iterator next method.

Load the data values from the next record in the query into the current data values.



boolean next( )

API Tags:

return:  TRUE if there are more results to fetch
access:  public

method paginate

Assign a pager to this query for the purposes of breaking up the resulting cursor into paged chucks.

void paginate( interface &$pager)

API Tags:

access:  public

Parameters:

interface   &$pager   Pager

method query

Assign a query for this object to process.

void query( string $Query_String)

API Tags:

access:  public

Parameters:

string   $Query_String   SQL statement

method reset

Move the current pointer to the first position in the cursor.

boolean reset( )

API Tags:

return:  TRUE if the query is valid.
access:  public
WACT: Copyright 2003 Procata, Inc. Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
Documentation generated on Sun, 28 Nov 2004 19:48:32 -0800 by phpDocumentor 1.2.3