Source for file OracleUpdateQueryResult.class.php

Documentation is available at OracleUpdateQueryResult.class.php

  1. <?php
  2. /**
  3. * @package harmoni.dbc.oracle
  4. *
  5. * @copyright Copyright &copy; 2005, Middlebury College
  6. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  7. *
  8. * @version $Id: OracleUpdateQueryResult.class.php,v 1.8 2007/09/05 21:39:00 adamfranco Exp $
  9. */
  10. require_once(HARMONI."DBHandler/UpdateQueryResult.interface.php");
  11.  
  12. /**
  13. * The UPDATEQueryResult interface provides the functionality common to all UPDATE query results.
  14. * For example, you can get the primary key for the last UPDATEion, get number of UPDATEed rows, etc.
  15. *
  16. * @package harmoni.dbc.oracle
  17. *
  18. * @copyright Copyright &copy; 2005, Middlebury College
  19. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  20. *
  21. * @version $Id: OracleUpdateQueryResult.class.php,v 1.8 2007/09/05 21:39:00 adamfranco Exp $
  22. */
  23. class OracleUpdateQueryResult
  24. implements UpdateQueryResultInterface
  25. {
  26.  
  27.  
  28.  
  29. /**
  30. * The resource id for this query.
  31. * @var integer __resourceId
  32. * @access private
  33. */
  34. var $_resourceId;
  35.  
  36.  
  37. /**
  38. * Stores the number of rows processed by the query.
  39. * Stores the number of rows processed by the query.
  40. * @var integer $_numberOfRows The number of rows processed by the query.
  41. * @access private
  42. */
  43. var $_numberOfRows;
  44.  
  45.  
  46.  
  47. /**
  48. * The constructor.
  49. * @access public
  50. * @param integer $resourceId The resource id for this query.
  51. */
  52. function OracleUpdateQueryResult($resourceId) {
  53. // ** parameter validation
  54. $resourceRule = ResourceValidatorRule::getRule();
  55. ArgumentValidator::validate($resourceId, $resourceRule, true);
  56. // ** end of parameter validation
  57.  
  58. $this->_resourceId = $resourceId;
  59. $this->_numberOfRows = ocirowcount($this->_resourceId);
  60. }
  61.  
  62.  
  63. /**
  64. * Returns the number of rows that the query processed.
  65. * Returns the number of rows that the query processed. For a SELECT query,
  66. * this would be the total number of rows selected. For a DELETE, INSERT, or
  67. * UPDATE query, this would be the number of rows that were affected.
  68. * @return integer Number of rows that were processed by the query.
  69. * @access public
  70. */
  71. function getNumberOfRows() {
  72. return $this->_numberOfRows;
  73. }
  74.  
  75. }
  76.  
  77. ?>

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