heroku/force — pull request #8 by ryanbrainard (2013-10-27 23:48:04+00:00)
Title: Add support for parent + child relationship SOQL queries

This change supersedes Pull Request #7 for just parent relationship queries and adds supports for child relationship queries as well. Similar to parent relationship queries, child relationships are returned as nested results; however, instead of being nested sobjects, they are nested query results and are best displayed as nested tables. For example:

```
force select "id, name, (select id, name, createdby.name from contacts) from account where id in (select accountid from contact) limit 2"
Id | Name | Contacts
--------------------+--------+--------------------------------------------------------
0016000000K7NdWAAV | Google | Id | Name | CreatedBy.Name
| | --------------------+-------------+----------------
| | 0036000000q0ab9AAA | Larry Page | Ryan Brainard
| | 0036000000pXGQjAAO | Sergey Brin | Ryan Brainard
| | --------------------+-------------+----------------
| | (2 records)
| |
0016000000Khr6YAAR | Yahoo! | Id | Name | CreatedBy.Name
| | --------------------+---------------+----------------
| | 0036000000qCwxyAAC | Marissa Mayer | Ryan Brainard
| | --------------------+---------------+----------------
| | (1 records)
| |
--------------------+--------+--------------------------------------------------------
(2 records)
```

Note in the example that this also supports child relationships looking back up to parent relationships with the display of `Contacts.CreatedBy.Name`.