An example is worth a thousand works, it would be cool if this worked:
$result = $database->query('SELECT * FROM books INNER JOIN authors ON books.author_id = author.id');
foreach ($result as $row->byTable()) {
echo $row->books->name . " by " . $row->authors->name;
}
It would be nice to cache, and pass into rowFactory / rowClass, the result of getResultColumns(). That way a custom rowFactory could accomplish this easily.
An example is worth a thousand works, it would be cool if this worked:
It would be nice to cache, and pass into
rowFactory
/rowClass
, the result ofgetResultColumns()
. That way a customrowFactory
could accomplish this easily.