xp-framework/rdbms — pull request #2 by thekid (2014-10-28 21:59:41+00:00)
Title: foreach support for rdbms.ResultSet

## Current semantics
Create a resultset, iterate until false is returned:

```php
$r= $conn->query('select news_id, caption, created_at from news');
while ($row= $r->next()) {
var_dump($row);
}
$r->close();
```

## Usage with `foreach`
Simply use the statement:

```php
$r= $conn->query('select news_id, caption, created_at from news');
foreach ($r as $row) {
var_dump($row);
}
```

This also makes `rdbms.ResultSet`s usable inside [data sequences](https://github.com/xp-forge/sequence)