Changeset 250
- Timestamp:
- 02/10/07 16:13:02 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/rdbms/pdo/stubDatabasePDOStatement.php
r194 r250 195 195 * @see http://php.net/pdostatement-fetchAll 196 196 * @see net.stubbles.rdbms.stubDatabaseResult::fetchAll() 197 * @todo fix handling of $fetchMode together with $driverOptions 197 198 */ 198 199 public function fetchAll($fetchMode = null, array $driverOptions = array()) 199 200 { 200 if (null == $fetchMode){201 $fetchMode = PDO::FETCH_BOTH;202 }203 204 try {201 try { 202 if (null == $fetchMode) { 203 return $this->pdoStatement->fetchAll(); 204 } 205 205 206 return $this->pdoStatement->fetchAll($fetchMode, ((isset($driverOptions['columnIndex']) == false) ? (null) : ($driverOptions['columnIndex']))); 206 207 } catch (PDOException $pdoe) { … … 253 254 * @throws stubDatabaseException 254 255 * @see http://php.net/pdostatement-closeCursor 255 * @see net.stubbles.rdbms.stubDatabase Statement::free()256 * @see net.stubbles.rdbms.stubDatabaseResult::free() 256 257 */ 257 258 public function free() … … 262 263 throw new stubDatabaseException($pdoe->getMessage(), $pdoe); 263 264 } 265 } 266 267 /** 268 * releases resources allocated for the specified prepared query 269 * 270 * Frees up the connection to the server so that other SQL statements may 271 * be issued, but leaves the statement in a state that enables it to be 272 * executed again. 273 * 274 * @return bool true on success, false on failure 275 * @throws stubDatabaseException 276 * @see net.stubbles.rdbms.stubDatabaseStatement::clean() 277 */ 278 public function clean() 279 { 280 $this->free(); 264 281 } 265 282 } trunk/src/main/php/net/stubbles/rdbms/stubDatabaseResult.php
r181 r250 71 71 */ 72 72 public function count(); 73 74 /** 75 * releases resources allocated of the result set 76 * 77 * @return bool true on success, false on failure 78 * @throws stubDatabaseException 79 */ 80 public function free(); 73 81 } 74 82 ?> trunk/src/main/php/net/stubbles/rdbms/stubDatabaseStatement.php
r194 r250 68 68 * @throws stubDatabaseException 69 69 */ 70 public function free();70 public function clean(); 71 71 } 72 72 ?>
