CFDBTransformEndpointQueryResultsIterator

The Contact Form DB CFDBTransformEndpointQueryResultsIterator class.

Defined (1)

The class is defined in the following location(s).

/CFDBTransformEndpoint.php  
  1. class CFDBTransformEndpointQueryResultsIterator extends CFDBAbstractQueryResultsIterator { 
  2.  
  3. /** 
  4. * @var CFDBTransformEndpoint 
  5. */ 
  6. var $endPoint; 
  7.  
  8. function __construct($endPoint) { 
  9. $this->endPoint = $endPoint; 
  10.  
  11. /** 
  12. * Execute the query 
  13. * @param $sql string query 
  14. * @param $queryOptions array associative 
  15. * @return void 
  16. */ 
  17. public function queryDataSource(&$sql, $queryOptions) { 
  18. // Do nothing. Data is in $this->$endPoint->source 
  19.  
  20. /** 
  21. * Get the next row from query results 
  22. * @return array associative 
  23. */ 
  24. public function fetchRow() { 
  25. if($this->endPoint->source->nextRow()) { 
  26. return $this->endPoint->source->row; 
  27. return null; 
  28.  
  29. /** 
  30. * @return boolean 
  31. */ 
  32. public function hasResults() { 
  33. // this is called by nextRow() in superclass 
  34. // return true and let next row sort it out 
  35. return true; 
  36.  
  37. /** 
  38. * If you do not iterate over all the rows returned, be sure to call this function 
  39. * on all remaining rows to free resources. 
  40. * @return void 
  41. */ 
  42. public function freeResult() { 
  43. // Do nothing